mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
handle if the file is zero bytes
This commit is contained in:
parent
ba00eda176
commit
fe1329c909
1 changed files with 4 additions and 0 deletions
|
@ -668,6 +668,10 @@ func (c *Client) updateState() (err error) {
|
|||
continue
|
||||
}
|
||||
fileHash, errHash := utils.HashFile(path.Join(fileInfo.FolderRemote, fileInfo.Name))
|
||||
if fileInfo.Size == 0 {
|
||||
log.Debugf("touching file with folder / name")
|
||||
continue
|
||||
}
|
||||
log.Debugf("%s %+x %+x %+v", fileInfo.Name, fileHash, fileInfo.Hash, errHash)
|
||||
if errHash != nil || !bytes.Equal(fileHash, fileInfo.Hash) {
|
||||
if errHash != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue