mirror of
https://github.com/schollz/croc.git
synced 2024-11-23 23:54:17 +03:00
Merge pull request #724 from schollz:schollz/issue723
fix: receiver needs to exit without initializing files if no files being transfered
This commit is contained in:
commit
23dce2aa3e
@ -1064,7 +1064,7 @@ func (c *Client) Receive() (err error) {
|
||||
err = c.transfer()
|
||||
if err == nil {
|
||||
if c.numberOfTransferredFiles+len(c.EmptyFoldersToTransfer) == 0 {
|
||||
fmt.Fprintf(os.Stderr, "\rNo files transferred.")
|
||||
fmt.Fprintf(os.Stderr, "\rNo files transferred.\n")
|
||||
}
|
||||
}
|
||||
return
|
||||
@ -1638,6 +1638,7 @@ func (c *Client) recipientGetFileReady(finished bool) (err error) {
|
||||
}
|
||||
c.SuccessfulTransfer = true
|
||||
c.FilesHasFinished[c.FilesToTransferCurrentNum] = struct{}{}
|
||||
return
|
||||
}
|
||||
|
||||
err = c.recipientInitializeFile()
|
||||
|
Loading…
Reference in New Issue
Block a user