diff options
| author | liubaojiang <1838095916@qq.com> | 2021-12-10 00:02:57 +0800 |
|---|---|---|
| committer | liubaojiang <1838095916@qq.com> | 2021-12-10 00:02:57 +0800 |
| commit | c7abc34dbb75d0dfe1bb5068e81d4f575f5af6ba (patch) | |
| tree | e9e2343faf5cec4a0207b828e70dd069c059285c /weed/filesys | |
| parent | 40ee9b4d7bb67aea22bd0998b4efe633db221b9b (diff) | |
| download | seaweedfs-c7abc34dbb75d0dfe1bb5068e81d4f575f5af6ba.tar.xz seaweedfs-c7abc34dbb75d0dfe1bb5068e81d4f575f5af6ba.zip | |
rename operation returns the correct old parent path
Diffstat (limited to 'weed/filesys')
| -rw-r--r-- | weed/filesys/dir_rename.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index 8a80559f6..1ee6922d8 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -111,7 +111,7 @@ func (dir *Dir) handleRenameResponse(ctx context.Context, resp *filer_pb.StreamR // change file handle inodeId := oldPath.AsInode() dir.wfs.handlesLock.Lock() - if existingHandle, found := dir.wfs.handles[inodeId]; found && existingHandle == nil { + if existingHandle, found := dir.wfs.handles[inodeId]; found && existingHandle != nil { glog.V(4).Infof("opened file handle %s => %s", oldPath, newPath) delete(dir.wfs.handles, inodeId) dir.wfs.handles[newPath.AsInode()] = existingHandle |
