diff options
| author | Chris Lu <chris.lu@uber.com> | 2019-03-15 15:26:09 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2019-03-15 15:26:09 -0700 |
| commit | 55c85f3a66fce8ba2d8613fc3fd2b0de1ca46bde (patch) | |
| tree | 3a5b68a29bf88c09979fd68af8c5d0f57e2b83fa /weed/filer2/filer.go | |
| parent | d30600e6d6b44101525d208b213a6c37bdfdba9e (diff) | |
| download | seaweedfs-55c85f3a66fce8ba2d8613fc3fd2b0de1ca46bde.tar.xz seaweedfs-55c85f3a66fce8ba2d8613fc3fd2b0de1ca46bde.zip | |
adding context
Diffstat (limited to 'weed/filer2/filer.go')
| -rw-r--r-- | weed/filer2/filer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go index eae1107ca..50df3fc0b 100644 --- a/weed/filer2/filer.go +++ b/weed/filer2/filer.go @@ -187,7 +187,7 @@ func (f *Filer) FindEntry(p FullPath) (entry *Entry, err error) { return f.store.FindEntry(p) } -func (f *Filer) DeleteEntryMetaAndData(p FullPath, isRecursive bool, shouldDeleteChunks bool) (err error) { +func (f *Filer) DeleteEntryMetaAndData(ctx context.Context, p FullPath, isRecursive bool, shouldDeleteChunks bool) (err error) { entry, err := f.FindEntry(p) if err != nil { return err @@ -211,7 +211,7 @@ func (f *Filer) DeleteEntryMetaAndData(p FullPath, isRecursive bool, shouldDelet if isRecursive { for _, sub := range entries { lastFileName = sub.Name() - f.DeleteEntryMetaAndData(sub.FullPath, isRecursive, shouldDeleteChunks) + f.DeleteEntryMetaAndData(ctx, sub.FullPath, isRecursive, shouldDeleteChunks) limit-- if limit <= 0 { break |
