fix: Try different directories on all kind of errors thrown for hive store

This commit is contained in:
Sorunome 2021-08-08 08:56:30 +02:00
parent 7f66fc733f
commit b7ddf795e8
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C

View File

@ -109,10 +109,10 @@ class FlutterMatrixHiveStore extends FamedlySdkHiveDatabase {
try {
try {
return (await getApplicationSupportDirectory()).path;
} on MissingPlatformDirectoryException {
} catch (_) {
return (await getApplicationDocumentsDirectory()).path;
}
} on MissingPlatformDirectoryException {
} catch (_) {
return (await getDownloadsDirectory()).path;
}
}