Browse Source

FUSE mount: clean up file handles during renaming

resolve dir rename when file is still open. Need to clean the file handles as soon as possible.

These can happen out of order:
file rename, then file release
file release, then file rename
pull/1377/head
Chris Lu 5 years ago
parent
commit
42a338d7b0
  1. 1
      weed/filesys/dir_rename.go

1
weed/filesys/dir_rename.go

@ -42,6 +42,7 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector
// fmt.Printf("rename path: %v => %v\n", oldPath, newPath)
dir.wfs.fsNodeCache.Move(oldPath, newPath)
delete(dir.wfs.handles, oldPath.AsInode())
}

Loading…
Cancel
Save