mirror of
https://github.com/schollz/croc.git
synced 2024-11-24 08:02:33 +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()
|
err = c.transfer()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if c.numberOfTransferredFiles+len(c.EmptyFoldersToTransfer) == 0 {
|
if c.numberOfTransferredFiles+len(c.EmptyFoldersToTransfer) == 0 {
|
||||||
fmt.Fprintf(os.Stderr, "\rNo files transferred.")
|
fmt.Fprintf(os.Stderr, "\rNo files transferred.\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -1638,6 +1638,7 @@ func (c *Client) recipientGetFileReady(finished bool) (err error) {
|
|||||||
}
|
}
|
||||||
c.SuccessfulTransfer = true
|
c.SuccessfulTransfer = true
|
||||||
c.FilesHasFinished[c.FilesToTransferCurrentNum] = struct{}{}
|
c.FilesHasFinished[c.FilesToTransferCurrentNum] = struct{}{}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = c.recipientInitializeFile()
|
err = c.recipientInitializeFile()
|
||||||
|
Loading…
Reference in New Issue
Block a user