From fe1329c9094889e9e4eab21c8299b59878535f17 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Fri, 19 Jul 2019 17:39:25 -0700 Subject: [PATCH] handle if the file is zero bytes --- src/croc/croc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/croc/croc.go b/src/croc/croc.go index 242094cf..d2be0bb6 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -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 {