From 3dc7ec69baa30a72542df2981415fa306373c83f Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 26 Dec 2020 14:36:43 +0100 Subject: [PATCH] make sortby ext work as expected (#539) --- nav.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nav.go b/nav.go index 29c3500..2a69817 100644 --- a/nav.go +++ b/nav.go @@ -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 }) }