chore: Change Hive database path

This commit is contained in:
Christian Pauly 2022-08-28 07:04:11 +02:00
parent a6f1d00daf
commit 4d65cb8f43
1 changed files with 3 additions and 3 deletions

View File

@ -62,14 +62,14 @@ class FlutterHiveCollectionsDatabase extends HiveCollectionsDatabase {
}
final db = FlutterHiveCollectionsDatabase(
'hive_collections_${client.clientName.replaceAll(' ', '_').toLowerCase()}',
'hive_${client.clientName.replaceAll(' ', '_').toLowerCase()}',
await _findDatabasePath(client),
key: hiverCipher,
);
try {
await db.open();
} catch (_) {
Logs().w('Unable to open Hive. Delete database and storage key...');
} catch (e, s) {
Logs().w('Unable to open Hive. Delete database and storage key...', e, s);
const FlutterSecureStorage().delete(key: _cipherStorageKey);
await db.clear();
rethrow;