mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user