summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-14 21:41:09 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-14 21:41:09 -0600
commit9ff81649f425370bf3c1aee32542a784119947f8 (patch)
treeb700e2a5f0a576745c98d5e0be0556f1270730cf
parent697d79fb12b79b65a501ec90dbb45ea165b3457d (diff)
parent72b86f4fa218c4425cfe70f8e800cb7152c83b5e (diff)
Merge branch 'lukeshu/repro'
-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
}