aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/ZipArchive
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-11 00:30:33 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-11 00:34:22 +0530
commit15b6cf541205d935b6afd483af79078c14a21215 (patch)
tree0a71457f114cb1fcee74b35ab2e8e6d8a7f7bd59 /WireGuard/WireGuard/ZipArchive
parentTunnelsManager: Don't act on status change on tunnelProviders we don't have (diff)
downloadwireguard-apple-15b6cf541205d935b6afd483af79078c14a21215.tar.xz
wireguard-apple-15b6cf541205d935b6afd483af79078c14a21215.zip
Error handling: alertText() can be nil
Indicating that no alert is to be shown for that error. Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/ZipArchive')
-rw-r--r--WireGuard/WireGuard/ZipArchive/ZipArchive.swift2
-rw-r--r--WireGuard/WireGuard/ZipArchive/ZipExporter.swift2
-rw-r--r--WireGuard/WireGuard/ZipArchive/ZipImporter.swift2
3 files changed, 3 insertions, 3 deletions
diff --git a/WireGuard/WireGuard/ZipArchive/ZipArchive.swift b/WireGuard/WireGuard/ZipArchive/ZipArchive.swift
index fe633d0f..a849daa3 100644
--- a/WireGuard/WireGuard/ZipArchive/ZipArchive.swift
+++ b/WireGuard/WireGuard/ZipArchive/ZipArchive.swift
@@ -8,7 +8,7 @@ enum ZipArchiveError: WireGuardAppError {
case cantOpenOutputZipFileForWriting
case badArchive
- func alertText() -> (String, String) {
+ func alertText() -> (String, String)? {
switch (self) {
case .cantOpenInputZipFile:
return ("Unable to read zip archive", "The zip archive could not be read.")
diff --git a/WireGuard/WireGuard/ZipArchive/ZipExporter.swift b/WireGuard/WireGuard/ZipArchive/ZipExporter.swift
index a4e9d7ac..4f576138 100644
--- a/WireGuard/WireGuard/ZipArchive/ZipExporter.swift
+++ b/WireGuard/WireGuard/ZipArchive/ZipExporter.swift
@@ -6,7 +6,7 @@ import UIKit
enum ZipExporterError: WireGuardAppError {
case noTunnelsToExport
- func alertText() -> (String, String) {
+ func alertText() -> (String, String)? {
switch (self) {
case .noTunnelsToExport:
return ("Nothing to export", "There are no tunnels to export")
diff --git a/WireGuard/WireGuard/ZipArchive/ZipImporter.swift b/WireGuard/WireGuard/ZipArchive/ZipImporter.swift
index 507a823d..d281fb68 100644
--- a/WireGuard/WireGuard/ZipArchive/ZipImporter.swift
+++ b/WireGuard/WireGuard/ZipArchive/ZipImporter.swift
@@ -6,7 +6,7 @@ import UIKit
enum ZipImporterError: WireGuardAppError {
case noTunnelsInZipArchive
- func alertText() -> (String, String) {
+ func alertText() -> (String, String)? {
switch (self) {
case .noTunnelsInZipArchive:
return ("No tunnels in zip archive", "No .conf tunnel files were found inside the zip archive.")