mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
bug fix: doesn't ask overwrite text Fixes #384
This commit is contained in:
parent
24fb8746a4
commit
27b7cdbf12
1 changed files with 1 additions and 1 deletions
|
@ -1267,7 +1267,7 @@ func (c *Client) updateIfRecipientHasFileInfo() (err error) {
|
|||
if !bytes.Equal(fileHash, fileInfo.Hash) {
|
||||
log.Debugf("hashed %s to %x using %s", fileInfo.Name, fileHash, c.Options.HashAlgorithm)
|
||||
log.Debugf("hashes are not equal %x != %x", fileHash, fileInfo.Hash)
|
||||
if errHash == nil && !c.Options.Overwrite && errRecipientFile == nil {
|
||||
if errHash == nil && !c.Options.Overwrite && errRecipientFile == nil && !strings.HasPrefix(fileInfo.Name, "croc-stdin-") {
|
||||
log.Debug("asking to overwrite")
|
||||
ans := utils.GetInput(fmt.Sprintf("\nOverwrite '%s'? (y/n) ", path.Join(fileInfo.FolderRemote, fileInfo.Name)))
|
||||
if strings.TrimSpace(strings.ToLower(ans)) != "y" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue