From 8d0e6f1ead815def7230ac8c41c9933f093e0b7b Mon Sep 17 00:00:00 2001 From: NyaMisty Date: Sun, 27 Apr 2025 23:52:49 +0800 Subject: [PATCH] fix: volume.list volume info output not in order (#6737) --- weed/shell/command_volume_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/shell/command_volume_list.go b/weed/shell/command_volume_list.go index 99fd1420b..208ef727d 100644 --- a/weed/shell/command_volume_list.go +++ b/weed/shell/command_volume_list.go @@ -190,7 +190,7 @@ func (c *commandVolumeList) writeDiskInfo(writer io.Writer, t *master_pb.DiskInf diskType = types.HddType } slices.SortFunc(t.VolumeInfos, func(a, b *master_pb.VolumeInformationMessage) int { - return int(a.Id - b.Id) + return int(a.Id) - int(b.Id) }) volumeInfosFound := false for _, vi := range t.VolumeInfos {