mirror of https://github.com/schollz/croc.git
reduce complexity
This commit is contained in:
parent
a7435a08bd
commit
8be63bed43
|
@ -799,7 +799,10 @@ func (c *Client) recipientGetFileReady(finished bool) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) updateIfRecipientHasFileInfo() (err error) {
|
func (c *Client) updateIfRecipientHasFileInfo() (err error) {
|
||||||
if !c.Options.IsSender && c.Step2FileInfoTransfered && !c.Step3RecipientRequestFile {
|
|
||||||
|
if !(!c.Options.IsSender && c.Step2FileInfoTransfered && !c.Step3RecipientRequestFile) {
|
||||||
|
return
|
||||||
|
}
|
||||||
// find the next file to transfer and send that number
|
// find the next file to transfer and send that number
|
||||||
// if the files are the same size, then look for missing chunks
|
// if the files are the same size, then look for missing chunks
|
||||||
finished := true
|
finished := true
|
||||||
|
@ -865,7 +868,6 @@ func (c *Client) updateIfRecipientHasFileInfo() (err error) {
|
||||||
// TODO: print out something about this file already existing
|
// TODO: print out something about this file already existing
|
||||||
}
|
}
|
||||||
err = c.recipientGetFileReady(finished)
|
err = c.recipientGetFileReady(finished)
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue