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)
This commit is contained in:
B. Petersen
2020-06-23 16:03:09 +02:00
parent 954029cdf8
commit dcade6b20a
@@ -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();