mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 09:47:35 +08:00
Migration: Only delete the cache if it exists
Fixes APP-EE
This commit is contained in:
@ -311,7 +311,9 @@ class Settings extends ChangeNotifier {
|
||||
Future<void> migrate(SharedPreferences pref, String gitBaseDir) async {
|
||||
if (version == 0) {
|
||||
var cache = p.join(gitBaseDir, "cache.json");
|
||||
await File(cache).delete(recursive: true);
|
||||
if (File(cache).existsSync()) {
|
||||
await File(cache).delete();
|
||||
}
|
||||
|
||||
var localGitRepoConfigured =
|
||||
pref.getBool("localGitRepoConfigured") ?? false;
|
||||
|
Reference in New Issue
Block a user