Skip to content

Commit

Permalink
send empty files
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Jul 20, 2019
1 parent 83db5bd commit 2735c42
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/croc/croc.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,13 @@ func (c *Client) updateState() (err error) {
fileHash, errHash := utils.HashFile(path.Join(fileInfo.FolderRemote, fileInfo.Name))
if fileInfo.Size == 0 {
log.Debugf("touching file with folder / name")
emptyFile, errCreate := os.Create(path.Join(fileInfo.FolderRemote, fileInfo.Name))
if errCreate != nil {
log.Error(errCreate)
err = errCreate
return
}
emptyFile.Close()
continue
}
log.Debugf("%s %+x %+x %+v", fileInfo.Name, fileHash, fileInfo.Hash, errHash)
Expand Down

0 comments on commit 2735c42

Please sign in to comment.