Skip to content

Commit

Permalink
Merge pull request #724 from schollz:schollz/issue723
Browse files Browse the repository at this point in the history
fix: receiver needs to exit without initializing files if no files being transfered
  • Loading branch information
schollz authored May 31, 2024
2 parents 9246408 + 88002b3 commit 23dce2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/croc/croc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1638,6 +1638,7 @@ func (c *Client) recipientGetFileReady(finished bool) (err error) {
}
c.SuccessfulTransfer = true
c.FilesHasFinished[c.FilesToTransferCurrentNum] = struct{}{}
return
}

err = c.recipientInitializeFile()
Expand Down

0 comments on commit 23dce2a

Please sign in to comment.