perf(lanzou): optimize the use of list cache (#2956)

* fix:local sort not cache

* perf(lanzou): Optimize the use of list cache
This commit is contained in:
foxxorcat
2023-01-08 21:31:35 +08:00
committed by GitHub
parent 99a186d01b
commit 2f19d4a834
7 changed files with 117 additions and 33 deletions

View File

@ -38,13 +38,6 @@ func list(ctx context.Context, path string, refresh ...bool) ([]model.Obj, error
om.InitHideReg(meta.Hide)
}
objs := om.Merge(virtualFiles, _objs...)
// sort objs
if storage != nil {
if storage.Config().LocalSort {
model.SortFiles(objs, storage.GetStorage().OrderBy, storage.GetStorage().OrderDirection)
}
model.ExtractFolder(objs, storage.GetStorage().ExtractFolder)
}
return objs, nil
}