diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-26 00:08:14 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-26 00:08:14 -0700 |
| commit | 7f0d87b2065ffb5e7be1bd0591416b9649839c9e (patch) | |
| tree | 11a60d3bc6fed6cbc97987e09f8e428ddc0a3c97 /weed/filesys/dir_rename.go | |
| parent | 2e4fadd10aa8835e7bcbbe25b46169a6335154f6 (diff) | |
| download | seaweedfs-7f0d87b2065ffb5e7be1bd0591416b9649839c9e.tar.xz seaweedfs-7f0d87b2065ffb5e7be1bd0591416b9649839c9e.zip | |
tree structured fs cache
FsCache for FsNode, wrapping fs.Node
Diffstat (limited to 'weed/filesys/dir_rename.go')
| -rw-r--r-- | weed/filesys/dir_rename.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index f0b3e2118..f8dbdbb6a 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -13,18 +13,19 @@ import ( func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirectory fs.Node) error { - newPath := util.NewFullPath(newDir.Path, req.NewName) - oldPath := util.NewFullPath(dir.Path, req.OldName) - newDir := newDirectory.(*Dir) + + newPath := util.NewFullPath(newDir.FullPath(), req.NewName) + oldPath := util.NewFullPath(dir.FullPath(), req.OldName) + glog.V(4).Infof("dir Rename %s => %s", oldPath, newPath) err := dir.wfs.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error { request := &filer_pb.AtomicRenameEntryRequest{ - OldDirectory: dir.Path, + OldDirectory: dir.FullPath(), OldName: req.OldName, - NewDirectory: newDir.Path, + NewDirectory: newDir.FullPath(), NewName: req.NewName, } |
