1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

Merge pull request #732 from raimocom/main

Update croc.go - console output clarification
This commit is contained in:
Zack 2024-06-05 18:48:24 -07:00 committed by GitHub
commit 6f974d96e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1775,9 +1775,9 @@ func (c *Client) updateIfRecipientHasFileInfo() (err error) {
percentDone := 100 - float64(len(missingChunks)*models.TCP_BUFFER_SIZE/2)/float64(fileInfo.Size)*100 percentDone := 100 - float64(len(missingChunks)*models.TCP_BUFFER_SIZE/2)/float64(fileInfo.Size)*100
log.Debug("asking to overwrite") log.Debug("asking to overwrite")
prompt := fmt.Sprintf("\nOverwrite '%s'? (y/N) ", path.Join(fileInfo.FolderRemote, fileInfo.Name)) prompt := fmt.Sprintf("\nOverwrite '%s'? (y/N) (use --overwrite to omit) ", path.Join(fileInfo.FolderRemote, fileInfo.Name))
if percentDone < 99 { if percentDone < 99 {
prompt = fmt.Sprintf("\nResume '%s' (%2.1f%%)? (y/N) ", path.Join(fileInfo.FolderRemote, fileInfo.Name), percentDone) prompt = fmt.Sprintf("\nResume '%s' (%2.1f%%)? (y/N) (use --overwrite to omit) ", path.Join(fileInfo.FolderRemote, fileInfo.Name), percentDone)
} }
choice := strings.ToLower(utils.GetInput(prompt)) choice := strings.ToLower(utils.GetInput(prompt))
if choice != "y" && choice != "yes" { if choice != "y" && choice != "yes" {