summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/android
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/wireguard/android')
-rw-r--r--app/src/main/java/com/wireguard/android/backends/VpnService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/backends/VpnService.java b/app/src/main/java/com/wireguard/android/backends/VpnService.java
index 084a2407..95736de5 100644
--- a/app/src/main/java/com/wireguard/android/backends/VpnService.java
+++ b/app/src/main/java/com/wireguard/android/backends/VpnService.java
@@ -369,6 +369,11 @@ public class VpnService extends Service
config.setName(configName);
configs.add(config);
} catch (IllegalArgumentException | IOException e) {
+ try {
+ file.delete();
+ } catch (Exception e2) {
+ Log.w(TAG, "Could not remove " + fileName, e2);
+ }
Log.w(TAG, "Failed to load config from " + fileName, e);
}
}