remove ctx if possible

This commit is contained in:
Chris Lu
2020-02-25 22:23:59 -08:00
parent ca4ca1ae6f
commit 97ab8a1976
26 changed files with 94 additions and 132 deletions

View File

@@ -232,9 +232,8 @@ func (fs *FilerServer) StreamDeleteEntries(stream filer_pb.SeaweedFiler_StreamDe
if err != nil {
return fmt.Errorf("receive delete entry request: %v", err)
}
ctx := context.Background()
fullpath := filer2.FullPath(filepath.ToSlash(filepath.Join(req.Directory, req.Name)))
err = fs.filer.DeleteEntryMetaAndData(ctx, fullpath, req.IsRecursive, req.IgnoreRecursiveError, req.IsDeleteData)
err = fs.filer.DeleteEntryMetaAndData(context.Background(), fullpath, req.IsRecursive, req.IgnoreRecursiveError, req.IsDeleteData)
resp := &filer_pb.DeleteEntryResponse{}
if err != nil {
resp.Error = err.Error()