summaryrefslogtreecommitdiff
path: root/lib/btrfs/io4_fs.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/btrfs/io4_fs.go')
-rw-r--r--lib/btrfs/io4_fs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/btrfs/io4_fs.go b/lib/btrfs/io4_fs.go
index 56cf266..749b2de 100644
--- a/lib/btrfs/io4_fs.go
+++ b/lib/btrfs/io4_fs.go
@@ -292,7 +292,8 @@ func (dir *Dir) populate() {
}
entriesWithIndexes := make(containers.Set[string])
nextIndex := uint64(2)
- for index, entry := range dir.ChildrenByIndex {
+ for _, index := range maps.SortedKeys(dir.ChildrenByIndex) {
+ entry := dir.ChildrenByIndex[index]
if index+1 > nextIndex {
nextIndex = index + 1
}