diff options
author | Samuel Holland <samuel@sholland.org> | 2018-01-18 04:12:54 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2018-01-18 04:12:54 -0600 |
commit | c683d23125359420725d9021ed29abda7380648d (patch) | |
tree | 7e85bfe3a7c6cf8d43bd531d19af180e5b6c1b8b /app/src/main | |
parent | 23535c05779253677c7cb62fb22fdef15af0a8ba (diff) |
FileConfigStore: Warn for deletion failure in exception path
There's nothing we can do about it at this point; we're already rolling
back changes.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main')
-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()); } } |