From 395de069c2020389a39f80146f2092fe4ed50cbd Mon Sep 17 00:00:00 2001 From: Xhofe Date: Mon, 11 Apr 2022 16:50:47 +0800 Subject: [PATCH] fix: extract_folder causes sorting confusion (close #929) --- model/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/file.go b/model/file.go index eb0cb0b8..de599d0c 100644 --- a/model/file.go +++ b/model/file.go @@ -56,7 +56,7 @@ func ExtractFolder(files []File, account *Account) { return } front := account.ExtractFolder == "front" - sort.Slice(files, func(i, j int) bool { + sort.SliceStable(files, func(i, j int) bool { if files[i].IsDir() || files[j].IsDir() { if !files[i].IsDir() { return !front