Removing a nonexistent file is success

This commit is contained in:
Jakob Borg 2014-05-20 20:27:21 +02:00
parent 3ca8dce98b
commit da3177dbe0

View File

@ -526,7 +526,7 @@ func (p *puller) handleEmptyBlock(b bqBlock) {
}
os.Remove(of.temp)
os.Chmod(of.filepath, 0666)
if os.Remove(of.filepath) == nil {
if err := os.Remove(of.filepath); err == nil || os.IsNotExist(err) {
p.model.updateLocal(p.repo, f)
}
} else {