diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-23 00:01:34 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-23 00:01:34 -0700 |
| commit | c0f0fdb3baeb6e9852c6876b23c1404b2c5e833d (patch) | |
| tree | b52ffd7ac51e5c0472f0d0e2a8f5b1338cbf270c /weed/filesys/dir_rename.go | |
| parent | fbca6b29bd48eeed54511a9b53b937597eee5d19 (diff) | |
| download | seaweedfs-c0f0fdb3baeb6e9852c6876b23c1404b2c5e833d.tar.xz seaweedfs-c0f0fdb3baeb6e9852c6876b23c1404b2c5e833d.zip | |
refactoring
Diffstat (limited to 'weed/filesys/dir_rename.go')
| -rw-r--r-- | weed/filesys/dir_rename.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index 1a220a063..9595ea955 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -3,9 +3,9 @@ package filesys import ( "context" - "github.com/chrislusf/seaweedfs/weed/filer2" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) @@ -35,15 +35,15 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector }) if err == nil { - newPath := filer2.NewFullPath(newDir.Path, req.NewName) - oldPath := filer2.NewFullPath(dir.Path, req.OldName) + newPath := util.NewFullPath(newDir.Path, req.NewName) + oldPath := util.NewFullPath(dir.Path, req.OldName) dir.wfs.cacheDelete(newPath) dir.wfs.cacheDelete(oldPath) oldFileNode := dir.wfs.getNode(oldPath, func() fs.Node { return nil }) - newDirNode := dir.wfs.getNode(filer2.FullPath(newDir.Path), func() fs.Node { + newDirNode := dir.wfs.getNode(util.FullPath(newDir.Path), func() fs.Node { return nil }) // fmt.Printf("new path: %v dir: %v node:%+v\n", newPath, newDir.Path, newDirNode) |
