aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/filechunks.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer/filechunks.go')
-rw-r--r--weed/filer/filechunks.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.go
index 3b99e0785..00f4c2921 100644
--- a/weed/filer/filechunks.go
+++ b/weed/filer/filechunks.go
@@ -114,9 +114,12 @@ func DoMinusChunksBySourceFileId(as, bs []*filer_pb.FileChunk) (delta []*filer_p
fileIds := make(map[string]bool)
for _, interval := range bs {
fileIds[interval.GetFileIdString()] = true
+ fileIds[interval.GetSourceFileId()] = true
}
for _, chunk := range as {
- if _, found := fileIds[chunk.GetSourceFileId()]; !found {
+ _, sourceFileIdFound := fileIds[chunk.GetSourceFileId()]
+ _, fileIdFound := fileIds[chunk.GetFileId()]
+ if !sourceFileIdFound && !fileIdFound {
delta = append(delta, chunk)
}
}