Fix don't try to create ObjectBox directory if already exists

merge-requests/67/merge
HankG 2023-03-22 11:46:40 -04:00
rodzic a5748d0ba7
commit 99a128d1d4
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -18,7 +18,10 @@ class ObjectBoxCache {
final path = p.join(docsDir.path, baseDir, subDir);
try {
Directory(path).createSync(recursive: true);
final directory = Directory(path);
if (!directory.existsSync()) {
Directory(path).createSync(recursive: true);
}
} catch (e) {
_logger.severe('Error creating ObjectCachePathDirectory: $e');
}