1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-23 18:35:54 +00:00

Correctly check db dir existence (fixes #1753) (#1755)

This commit is contained in:
Simon Frei 2022-02-09 10:42:03 +01:00 committed by GitHub
parent 1634019cc1
commit 07162121e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -217,7 +217,7 @@ public class FirstStartActivity extends Activity {
FileUtils.deleteQuietly(dbDir); FileUtils.deleteQuietly(dbDir);
} catch (Throwable e) { } catch (Throwable e) {
Log.w(TAG, "Deleting database with FileUtils failed", e); Log.w(TAG, "Deleting database with FileUtils failed", e);
Util.runShellCommand("rm -r" + dbDir.getAbsolutePath(), false); Util.runShellCommand("rm -r " + dbDir.getAbsolutePath(), false);
if (dbDir.exists()) { if (dbDir.exists()) {
throw new RuntimeException("Failed to delete existing database"); throw new RuntimeException("Failed to delete existing database");
} }