Importing: Use case-insensitive comparison for zip extension
This commit is contained in:
parent
1da882785e
commit
d3299ef94e
|
@ -5,7 +5,7 @@ import Foundation
|
||||||
|
|
||||||
class TunnelImporter {
|
class TunnelImporter {
|
||||||
static func importFromFile(url: URL, into tunnelsManager: TunnelsManager, sourceVC: AnyObject?, errorPresenterType: ErrorPresenterProtocol.Type, completionHandler: (() -> Void)? = nil) {
|
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
|
ZipImporter.importConfigFiles(from: url) { result in
|
||||||
if let error = result.error {
|
if let error = result.error {
|
||||||
errorPresenterType.showErrorAlert(error: error, from: sourceVC)
|
errorPresenterType.showErrorAlert(error: error, from: sourceVC)
|
||||||
|
|
Loading…
Reference in New Issue