From d3299ef94e5198d4d2b22f987b9b8dce13cbb90c Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Mon, 25 Feb 2019 16:16:58 +0530 Subject: [PATCH] Importing: Use case-insensitive comparison for zip extension --- WireGuard/WireGuard/UI/TunnelImporter.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WireGuard/WireGuard/UI/TunnelImporter.swift b/WireGuard/WireGuard/UI/TunnelImporter.swift index 06148d3..7625761 100644 --- a/WireGuard/WireGuard/UI/TunnelImporter.swift +++ b/WireGuard/WireGuard/UI/TunnelImporter.swift @@ -5,7 +5,7 @@ import Foundation class TunnelImporter { static func importFromFile(url: URL, into tunnelsManager: TunnelsManager, sourceVC: AnyObject?, errorPresenterType: ErrorPresenterProtocol.Type, completionHandler: (() -> Void)? = nil) { - if url.pathExtension == "zip" { + if url.pathExtension.lowercased() == "zip" { ZipImporter.importConfigFiles(from: url) { result in if let error = result.error { errorPresenterType.showErrorAlert(error: error, from: sourceVC)