소스 검색

Check for deleted files

Audrius Butkevicius 11 년 전
부모
커밋
cba38b15a9
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      internal/model/puller.go

+ 4 - 1
internal/model/puller.go

@@ -370,7 +370,10 @@ nextFile:
 			continue
 		}
 
-		if !f.IsSymlink() {
+		// Local file can be already deleted, but with a lower version
+		// number, hence the deletion coming in again as part of
+		// WithNeed
+		if !f.IsSymlink() && !f.IsDeleted() {
 			key := string(f.Blocks[0].Hash)
 			for i, candidate := range buckets[key] {
 				if scanner.BlocksEqual(candidate.Blocks, f.Blocks) {