Skip to content

Commit

Permalink
don't show number of folders if the number is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed May 18, 2022
1 parent da5d19e commit b7e4a73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/croc/croc.go
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,11 @@ func (c *Client) processMessageFileInfo(m message.Message) (done bool, err error
machID, _ := machineid.ID()
fmt.Fprintf(os.Stderr, "\rYour machine id is '%s'.\n%s %s (%s) from '%s'? (Y/n) ", machID, action, fname, utils.ByteCountDecimal(totalSize), senderInfo.MachineID)
} else {
fmt.Fprintf(os.Stderr, "\r%s %s and %s (%s)? (Y/n) ", action, fname, folderName, utils.ByteCountDecimal(totalSize))
if c.TotalNumberFolders > 0 {
fmt.Fprintf(os.Stderr, "\r%s %s and %s (%s)? (Y/n) ", action, fname, folderName, utils.ByteCountDecimal(totalSize))
} else {
fmt.Fprintf(os.Stderr, "\r%s %s (%s)? (Y/n) ", action, fname, utils.ByteCountDecimal(totalSize))
}
}
choice := strings.ToLower(utils.GetInput(""))
if choice != "" && choice != "y" && choice != "yes" {
Expand Down

0 comments on commit b7e4a73

Please sign in to comment.