aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/disk_location_ec.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-09-25 09:35:16 -0700
committerchrislu <chris.lu@gmail.com>2023-09-25 09:35:16 -0700
commit645ae8c57bc449cbb298e90d1ad19f7d2153aea0 (patch)
tree08458e352ea27e8e673a3670269ec84f04512d77 /weed/storage/disk_location_ec.go
parent3d07895518b2b6e816518be0a2355c1f0a98ff15 (diff)
downloadseaweedfs-645ae8c57bc449cbb298e90d1ad19f7d2153aea0.tar.xz
seaweedfs-645ae8c57bc449cbb298e90d1ad19f7d2153aea0.zip
Revert "Revert "Merge branch 'master' of https://github.com/seaweedfs/seaweedfs""
This reverts commit 8cb42c39
Diffstat (limited to 'weed/storage/disk_location_ec.go')
-rw-r--r--weed/storage/disk_location_ec.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go
index 5af354277..8315fe363 100644
--- a/weed/storage/disk_location_ec.go
+++ b/weed/storage/disk_location_ec.go
@@ -7,6 +7,7 @@ import (
"path"
"regexp"
"strconv"
+ "strings"
"github.com/seaweedfs/seaweedfs/weed/storage/erasure_coding"
"github.com/seaweedfs/seaweedfs/weed/storage/needle"
@@ -144,8 +145,8 @@ func (l *DiskLocation) loadAllEcShards() (err error) {
}
dirEntries = append(dirEntries, indexDirEntries...)
}
- slices.SortFunc(dirEntries, func(a, b os.DirEntry) bool {
- return a.Name() < b.Name()
+ slices.SortFunc(dirEntries, func(a, b os.DirEntry) int {
+ return strings.Compare(a.Name(), b.Name())
})
var sameVolumeShards []string
var prevVolumeId needle.VolumeId