kopia lustrzana https://gitlab.com/mysocialportal/relatica
Fix ObjectBoxCache creation problem by using ID instead of name
rodzic
c18581b277
commit
09044702f0
|
@ -17,7 +17,11 @@ class ObjectBoxCache {
|
|||
final docsDir = await getApplicationSupportDirectory();
|
||||
|
||||
final path = p.join(docsDir.path, baseDir, subDir);
|
||||
Directory(path).createSync(recursive: true);
|
||||
try {
|
||||
Directory(path).createSync(recursive: true);
|
||||
} catch (e) {
|
||||
_logger.severe('Error creating ObjectCachePathDirectory: $e');
|
||||
}
|
||||
_logger.info('ObjectBoxCache path: $path');
|
||||
final store = await openStore(
|
||||
directory: path, macosApplicationGroup: 'T69YZGT58U.relatica');
|
||||
|
|
|
@ -87,7 +87,7 @@ Future<void> dependencyInjectionInitialization() async {
|
|||
Future<void> updateProfileDependencyInjectors(Profile profile) async {
|
||||
final objectBox = await ObjectBoxCache.create(
|
||||
baseDir: 'profileboxcaches',
|
||||
subDir: '${profile.username}_${profile.serverName}',
|
||||
subDir: '${profile.id}_${profile.serverName}',
|
||||
);
|
||||
final connectionReposSelector =
|
||||
getIt<ActiveProfileSelector<IConnectionsRepo>>();
|
||||
|
|
Ładowanie…
Reference in New Issue