From 61da208c9571f3348eb0e11400fa54365d49a366 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 5 May 2019 17:38:04 +0200 Subject: ui: use natural sorting order --- ui/tunnelspage.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui/tunnelspage.go') diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go index 8bcf6aaa..c2521a6b 100644 --- a/ui/tunnelspage.go +++ b/ui/tunnelspage.go @@ -314,8 +314,7 @@ func (tp *TunnelsPage) importFiles(paths []string) { // Add in reverse order so that the first one is selected. sort.Slice(unparsedConfigs, func(i, j int) bool { - //TODO: use proper tunnel string sorting/comparison algorithm, as the other comments indicate too. - return strings.Compare(unparsedConfigs[i].Name, unparsedConfigs[j].Name) > 0 + return conf.TunnelNameIsLess(unparsedConfigs[j].Name, unparsedConfigs[i].Name) }) existingTunnelList, err := service.IPCClientTunnels() -- cgit v1.2.3-59-g8ed1b