Importing: Show error when the zip file contains no .conf files
This commit is contained in:
parent
c681b02f7d
commit
771aab9f0f
|
@ -159,6 +159,10 @@ class TunnelsListTableViewController: UITableViewController {
|
||||||
} catch (let error) {
|
} catch (let error) {
|
||||||
print("Error opening zip archive: \(error)")
|
print("Error opening zip archive: \(error)")
|
||||||
}
|
}
|
||||||
|
guard (unarchivedFiles.count > 0) else {
|
||||||
|
showErrorAlert(title: "No configurations found", message: "Zip archive doesn't contain any .conf files")
|
||||||
|
return
|
||||||
|
}
|
||||||
var numberOfConfigFilesWithErrors = 0
|
var numberOfConfigFilesWithErrors = 0
|
||||||
var tunnelConfigurationsToAdd: [TunnelConfiguration] = []
|
var tunnelConfigurationsToAdd: [TunnelConfiguration] = []
|
||||||
for unarchivedFile in unarchivedFiles {
|
for unarchivedFile in unarchivedFiles {
|
||||||
|
|
Loading…
Reference in New Issue