Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

mount: need to change entry name after renaming

chrislu67b0645808f8
diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go
index d8ea3e4599..539ee67d26 100644
--- a/weed/filesys/dir_rename.go
+++ b/weed/filesys/dir_rename.go
@@ -114,6 +114,8 @@ func (dir *Dir) handleRenameResponse(ctx context.Context, resp *filer_pb.StreamR
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)
+ existingHandle.handle = newPath.AsInode()
+ existingHandle.f.entry.Name = newName
dir.wfs.handles[newPath.AsInode()] = existingHandle
}
dir.wfs.handlesLock.Unlock()