From e86dfbe8ffe861befc804c58cc70f30c7ca2a53b Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 3 Feb 2019 21:50:08 +0700 Subject: [PATCH] fix: case dependency and sorting order (#661) (#662) Former-commit-id: a772b30907a92818e5c109adc0d382af7ddf40dc [formerly 589c237e7f1230f16970c0b68263d4174dbe98f6] [formerly c3a0e4964d028dc06e5076869dd92975eb3c4699 [formerly 17b514510bfe9e7f19a061b28b513f18b6408ab6]] Former-commit-id: 8e2c49d8fc18df68bb3172fbb98a97c98a5eb818 [formerly bc396cbf040a5016a26cd5387b14e9f55f8b74c6] Former-commit-id: bda1997f4292c213e907ed0d8e566c5ab931edb9 --- files/listing.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/listing.go b/files/listing.go index 116b882b..d09f67e1 100644 --- a/files/listing.go +++ b/files/listing.go @@ -2,6 +2,7 @@ package files import ( "sort" + "strings" "github.com/maruel/natural" ) @@ -68,7 +69,7 @@ func (l byName) Less(i, j int) bool { return false } - return natural.Less(l.Items[i].Name, l.Items[j].Name) + return natural.Less(strings.ToLower(l.Items[j].Name), strings.ToLower(l.Items[i].Name)) } // By Size