mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Fixed HabiticaApplication.exists()
It always returned `false` because it was targeting the wrong file.
This commit is contained in:
parent
1868103380
commit
5da955275b
1 changed files with 1 additions and 4 deletions
|
|
@ -165,11 +165,8 @@ public class HabiticaApplication extends Application {
|
|||
}
|
||||
|
||||
public static boolean exists(@NonNull Context context) {
|
||||
|
||||
String databaseName = "HabiticaDatabase/" + HabitDatabase.NAME;
|
||||
|
||||
try {
|
||||
File dbFile = context.getDatabasePath(databaseName);
|
||||
File dbFile = context.getDatabasePath(String.format("%s.db", HabitDatabase.NAME));
|
||||
return dbFile.exists();
|
||||
} catch (Exception exception) {
|
||||
Log.e(exception.toString(), "Database %s doesn't exist.");
|
||||
|
|
|
|||
Loading…
Reference in a new issue