File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,20 @@ class StorageProvider {
56
56
basePath = path.join (useCustomPath == true ? customPath.isNotEmpty ? customPath : appDir.path : appDir.path, 'Dartotsu' );
57
57
}
58
58
59
+ final baseDirectory = Directory (basePath);
60
+ if (! baseDirectory.existsSync ()) {
61
+ baseDirectory.createSync (recursive: true );
62
+ }
63
+
59
64
final fullPath = path.join (basePath, subPath ?? '' );
60
- return Directory (fullPath);
61
- }
65
+ final fullDirectory = Directory (fullPath);
62
66
67
+ if (subPath != null && subPath.isNotEmpty && ! fullDirectory.existsSync ()) {
68
+ fullDirectory.createSync (recursive: true );
69
+ }
70
+
71
+ return fullDirectory;
72
+ }
63
73
Future <Isar > initDB (String ? path, {bool inspector = false }) async {
64
74
Directory ? dir;
65
75
if (path == null ) {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Logger {
17
17
if (! await directory.exists ()) {
18
18
await directory.create (recursive: true );
19
19
}
20
- _logFile = File ('${directory .path }\\ appLogs.txt' );
20
+ _logFile = File ('${directory .path }/ appLogs.txt' );
21
21
22
22
if (await _logFile! .exists ()) {
23
23
await _logFile! .delete ();
You can’t perform that action at this time.
0 commit comments