From 2f8a14eaa0d259322758d2d5670e7b76e6725779 Mon Sep 17 00:00:00 2001 From: Daniel Barton Date: Thu, 9 May 2024 23:00:18 +0800 Subject: [PATCH] server(filesystem): Fix sort position of directories Correct the sorting order so that directories are at the beginning as intended. --- server/filesystem/filesystem.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/filesystem/filesystem.go b/server/filesystem/filesystem.go index bfd49bc..42c56f2 100644 --- a/server/filesystem/filesystem.go +++ b/server/filesystem/filesystem.go @@ -480,9 +480,9 @@ func (fs *Filesystem) ListDirectory(p string) ([]Stat, error) { case a.IsDir() && b.IsDir(): return 0 case a.IsDir(): - return 1 - default: return -1 + default: + return 1 } })