Importing: Show error when the zip file contains no .conf files
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
cf7966e876
commit
193b8c2596
|
@ -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