From dcade6b20aad2287bb6ce091c20f07706638612c Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 23 Jun 2020 16:03:09 +0200 Subject: [PATCH] more accurate check of account-database-names account-database-names have the format messenger*.db - only checking for the extension will offer eg. mapbox cachefiles in the account switcher (mbgl-offline.db) --- src/org/thoughtcrime/securesms/connect/AccountManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/connect/AccountManager.java b/src/org/thoughtcrime/securesms/connect/AccountManager.java index b01526943..53639e877 100644 --- a/src/org/thoughtcrime/securesms/connect/AccountManager.java +++ b/src/org/thoughtcrime/securesms/connect/AccountManager.java @@ -64,7 +64,7 @@ public class AccountManager { private @Nullable Account maybeGetAccount(File file) { try { - if (!file.isDirectory() && file.getName().endsWith(".db")) { + if (!file.isDirectory() && file.getName().startsWith("messenger") && file.getName().endsWith(".db")) { DcContext testContext = new DcContext(null, file.getAbsolutePath()); if (testContext.isOk()) { Account ret = new Account();