This commit is contained in:
Zack Scholl 2018-07-01 12:52:54 -07:00
parent f4d607a4cf
commit 51f3de95a7
1 changed files with 6 additions and 1 deletions

View File

@ -14,13 +14,18 @@ func promptCodePhrase() string {
}
func promptOkayToRecieve(f FileMetaData) (ok bool) {
overwritingOrReceiving := "Receiving"
if exists(f.Name) {
overwritingOrReceiving = "Overwriting"
}
fileOrFolder := "file"
if f.IsDir {
fileOrFolder = "folder"
}
return "y" == getInput(fmt.Sprintf(
`Receiving %s (%s) into: %s
`%s %s (%s) into: %s
ok? (y/N): `,
overwritingOrReceiving,
fileOrFolder,
humanize.Bytes(uint64(f.Size)),
f.Name,