chore: rename index to order of storage

This commit is contained in:
Noah Hsu
2022-09-07 15:55:15 +08:00
parent 53fc2f32d8
commit 71d30b6819
6 changed files with 15 additions and 14 deletions

View File

@ -268,10 +268,10 @@ func GetStorageVirtualFilesByPath(prefix string) []model.Obj {
files := make([]model.Obj, 0)
storages := storagesMap.Values()
sort.Slice(storages, func(i, j int) bool {
if storages[i].GetStorage().Index == storages[j].GetStorage().Index {
if storages[i].GetStorage().Order == storages[j].GetStorage().Order {
return storages[i].GetStorage().MountPath < storages[j].GetStorage().MountPath
}
return storages[i].GetStorage().Index < storages[j].GetStorage().Index
return storages[i].GetStorage().Order < storages[j].GetStorage().Order
})
prefix = utils.StandardizePath(prefix)
if prefix != "/" {