Fix: http rename move dir to subdir (#4432)

Co-authored-by: wang wusong <wangwusong@virtaitech.com>
This commit is contained in:
wusong
2023-04-27 11:54:36 +08:00
committed by GitHub
parent d75a7b7f62
commit 4867aa03ab
2 changed files with 11 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ func (fs *FilerServer) AtomicRenameEntry(ctx context.Context, req *filer_pb.Atom
oldParent := util.FullPath(filepath.ToSlash(req.OldDirectory))
newParent := util.FullPath(filepath.ToSlash(req.NewDirectory))
if err := fs.filer.CanRename(oldParent, newParent); err != nil {
if err := fs.filer.CanRename(oldParent, newParent, req.OldName); err != nil {
return nil, err
}
@@ -55,7 +55,7 @@ func (fs *FilerServer) StreamRenameEntry(req *filer_pb.StreamRenameEntryRequest,
oldParent := util.FullPath(filepath.ToSlash(req.OldDirectory))
newParent := util.FullPath(filepath.ToSlash(req.NewDirectory))
if err := fs.filer.CanRename(oldParent, newParent); err != nil {
if err := fs.filer.CanRename(oldParent, newParent, req.OldName); err != nil {
return err
}