From 942a30f04c74d7a73dce4169d558358ee7fd6689 Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 5 Jan 2021 12:24:32 +0800 Subject: [PATCH] remove sort --- weed/filer/filer_search.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/weed/filer/filer_search.go b/weed/filer/filer_search.go index 7489d8e34..34358d849 100644 --- a/weed/filer/filer_search.go +++ b/weed/filer/filer_search.go @@ -42,17 +42,7 @@ func (f *Filer) ListDirectoryEntries(ctx context.Context, p util.FullPath, start } } - //Distinguish between folders and common files, folders are listed first - var folderEntries, commonEntries []*Entry - for i, _ := range entries { - if entries[i].IsDirectory() { - folderEntries = append(folderEntries, entries[i]) - } else { - commonEntries = append(commonEntries, entries[i]) - } - } - folderEntries = append(folderEntries, commonEntries...) - return folderEntries, err + return entries, err } func (f *Filer) doListPatternMatchedEntries(ctx context.Context, p util.FullPath, startFileName string, inclusive bool, limit int, prefix, restNamePattern string) (matchedEntries []*Entry, missedCount int, lastFileName string, err error) {