aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/ZipArchive/ZipImporter.swift
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-17 10:28:27 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-18 06:46:55 +0100
commitb2b5e0e3798af928f90c24531182ec0ae5ed7c58 (patch)
tree6c4f5f2e7dc420e5f177a28a1bbedbffb2461182 /WireGuard/WireGuard/ZipArchive/ZipImporter.swift
parentringlogger: support mpsc for singlefile (diff)
downloadwireguard-apple-b2b5e0e3798af928f90c24531182ec0ae5ed7c58.tar.xz
wireguard-apple-b2b5e0e3798af928f90c24531182ec0ae5ed7c58.zip
TunnelName: sort correctly with numbers and capitals
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'WireGuard/WireGuard/ZipArchive/ZipImporter.swift')
-rw-r--r--WireGuard/WireGuard/ZipArchive/ZipImporter.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/ZipArchive/ZipImporter.swift b/WireGuard/WireGuard/ZipArchive/ZipImporter.swift
index b86b06e..ade30a6 100644
--- a/WireGuard/WireGuard/ZipArchive/ZipImporter.swift
+++ b/WireGuard/WireGuard/ZipArchive/ZipImporter.swift
@@ -37,7 +37,7 @@ class ZipImporter {
fatalError()
}
- unarchivedFiles.sort { $0.fileBaseName < $1.fileBaseName }
+ unarchivedFiles.sort { TunnelsManager.tunnelNameIsLessThan($0.fileBaseName, $1.fileBaseName) }
var configs: [TunnelConfiguration?] = Array(repeating: nil, count: unarchivedFiles.count)
for (index, file) in unarchivedFiles.enumerated() {
if index > 0 && file == unarchivedFiles[index - 1] {