diff --git a/lib/app.dart b/lib/app.dart index f608a20a..673c8eab 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -59,6 +59,14 @@ class JournalApp extends StatefulWidget { appState.save(pref); } + if (!Directory(appState.gitBaseDirectory).existsSync()) { + Log.w("Applications Documents Directory no longer exists"); + var dir = await getApplicationDocumentsDirectory(); + appState.gitBaseDirectory = dir.path; + appState.save(pref); + Log.i("New Documents Directory Path ${dir.path}"); + } + if (appState.localGitRepoConfigured == false) { // FIXME: What about exceptions! appState.localGitRepoFolderName = "journal_local"; diff --git a/lib/appstate.dart b/lib/appstate.dart index 68df6429..228c5499 100644 --- a/lib/appstate.dart +++ b/lib/appstate.dart @@ -55,6 +55,7 @@ class AppState { Log.i("localGitRepoFolderName: $localGitRepoFolderName"); Log.i("remoteGitRepoFolderName: $remoteGitRepoFolderName"); Log.i("onBoardingCompleted: $onBoardingCompleted"); + Log.i("gitBaseDirectory: $gitBaseDirectory"); Log.i(" ------------------ "); }