From cba38b15a9db1264530aeac4cf0a9d6ff5026868 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Sun, 18 Jan 2015 13:44:10 +0000 Subject: [PATCH] Check for deleted files --- internal/model/puller.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/model/puller.go b/internal/model/puller.go index 23727c8a..679f8e7f 100644 --- a/internal/model/puller.go +++ b/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) {