Browse Source

set renamed item to new directory

related to https://github.com/chrislusf/seaweedfs/issues/2064
pull/2074/head
Chris Lu 4 years ago
parent
commit
789465d99e
  1. 2
      weed/filesys/dir_rename.go

2
weed/filesys/dir_rename.go

@ -71,11 +71,13 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector
glog.V(4).Infof("internal file node %s", file.Name)
file.Name = req.NewName
file.id = uint64(newFsNode)
file.dir = newDir
}
if dir, ok := internalNode.(*Dir); ok {
glog.V(4).Infof("internal dir node %s", dir.name)
dir.name = req.NewName
dir.id = uint64(newFsNode)
dir.parent = newDir
}
})

Loading…
Cancel
Save