properly lock file.entry object

fix https://github.com/chrislusf/seaweedfs/issues/1882
This commit is contained in:
Chris Lu
2021-03-09 23:08:38 -08:00
parent bf5b795717
commit 5ba4b479f8
5 changed files with 89 additions and 45 deletions

View File

@@ -124,8 +124,9 @@ func (c *FsCache) Move(oldPath util.FullPath, newPath util.FullPath) *FsNode {
}
if f, ok := src.node.(*File); ok {
f.Name = target.name
if f.entry != nil {
f.entry.Name = f.Name
entry := f.getEntry()
if entry != nil {
entry.Name = f.Name
}
}
parent.disconnectChild(target)