make sortby ext work as expected (#539)

This commit is contained in:
Marius 2020-12-26 14:36:43 +01:00 committed by GitHub
parent 82f03102a5
commit 3dc7ec69ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
nav.go
View File

@ -200,7 +200,7 @@ func (dir *dir) sort() {
// in order to also have natural sorting with the filenames
// combine the name with the ext but have the ext at the front
return (ext1 + name1) < (ext2 + name2)
return ext1 < ext2 || ext1 == ext2 && name1 < name2
})
}