aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/inode_to_path.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-07-23 18:20:29 -0700
committerchrislu <chris.lu@gmail.com>2022-07-23 18:20:29 -0700
commitd24db396cc845518dbc5fad32011e5d174354b62 (patch)
treeafe893b1bf0529ace5272a8d5cd9ceaa10dfe00b /weed/mount/inode_to_path.go
parent41eeb4deef02eb7981e01dcba9b6e8469d7fed38 (diff)
downloadseaweedfs-d24db396cc845518dbc5fad32011e5d174354b62.tar.xz
seaweedfs-d24db396cc845518dbc5fad32011e5d174354b62.zip
fix removing path from inode2path
Diffstat (limited to 'weed/mount/inode_to_path.go')
-rw-r--r--weed/mount/inode_to_path.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go
index 6118d51cf..dd125f250 100644
--- a/weed/mount/inode_to_path.go
+++ b/weed/mount/inode_to_path.go
@@ -34,8 +34,8 @@ func (ie *InodeEntry) removeOnePath(p util.FullPath) bool {
if idx < 0 {
return false
}
- for x := len(ie.paths) - 2; x > idx; x-- {
- ie.paths[x-1] = ie.paths[x]
+ for x := idx; x < len(ie.paths)-1; x++ {
+ ie.paths[x] = ie.paths[x+1]
}
ie.paths = ie.paths[0 : len(ie.paths)-1]
return true