server(filesystem): Fix sort position of directories
Correct the sorting order so that directories are at the beginning as intended.
This commit is contained in:
@@ -480,9 +480,9 @@ func (fs *Filesystem) ListDirectory(p string) ([]Stat, error) {
|
|||||||
case a.IsDir() && b.IsDir():
|
case a.IsDir() && b.IsDir():
|
||||||
return 0
|
return 0
|
||||||
case a.IsDir():
|
case a.IsDir():
|
||||||
return 1
|
|
||||||
default:
|
|
||||||
return -1
|
return -1
|
||||||
|
default:
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user