diff options
-rw-r--r-- | app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java b/app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java index f5cd01f0..ea5baf6d 100644 --- a/app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java +++ b/app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java @@ -77,7 +77,8 @@ public final class FileConfigStore implements ConfigStore { if (!replacementFile.createNewFile()) throw new IOException("Configuration for " + replacement + " already exists"); if (!file.renameTo(replacementFile)) { - replacementFile.delete(); + if (!replacementFile.delete()) + Log.w(TAG, "Couldn't delete marker file for new name " + replacement); throw new IOException("Cannot rename configuration file " + file.getName()); } } |