aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/filer.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer2/filer.go')
-rw-r--r--weed/filer2/filer.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go
index e886b7d74..cf6b4ba28 100644
--- a/weed/filer2/filer.go
+++ b/weed/filer2/filer.go
@@ -123,7 +123,7 @@ func (f *Filer) FindEntry(p FullPath) (entry *Entry, err error) {
return f.store.FindEntry(p)
}
-func (f *Filer) DeleteEntryMetaAndData(p FullPath) (err error) {
+func (f *Filer) DeleteEntryMetaAndData(p FullPath, shouldDeleteChunks bool) (err error) {
entry, err := f.FindEntry(p)
if err != nil {
return err
@@ -139,7 +139,9 @@ func (f *Filer) DeleteEntryMetaAndData(p FullPath) (err error) {
}
}
- f.deleteChunks(entry)
+ if shouldDeleteChunks {
+ f.deleteChunks(entry)
+ }
return f.store.DeleteEntry(p)
}