Browse Source

Removing a nonexistent file is success

Jakob Borg 11 years ago
parent
commit
da3177dbe0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      model/puller.go

+ 1 - 1
model/puller.go

@@ -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 {