shell: add fs.mv

fix https://github.com/chrislusf/seaweedfs/issues/954
This commit is contained in:
Chris Lu
2019-07-11 09:29:04 -07:00
parent 1d1b355f9e
commit 9e47c4749a
2 changed files with 101 additions and 0 deletions

View File

@@ -96,6 +96,11 @@ func (fs *FilerServer) moveSelfEntry(ctx context.Context, oldParent filer2.FullP
glog.V(1).Infof("moving entry %s => %s", oldPath, newPath)
if oldPath == newPath {
glog.V(1).Infof("skip moving entry %s => %s", oldPath, newPath)
return nil
}
// add to new directory
newEntry := &filer2.Entry{
FullPath: newPath,