We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 541eb94 commit d20bd9aCopy full SHA for d20bd9a
1 file changed
src/main/db/index.ts
@@ -44,6 +44,11 @@ export function useDB() {
44
return db
45
46
const dbPath = `${store.preferences.get('storagePath')}/${DB_NAME}`
47
+ const dbDir = path.dirname(dbPath)
48
+
49
+ if (!fs.existsSync(dbDir)) {
50
+ fs.mkdirSync(dbDir, { recursive: true })
51
+ }
52
53
if (fs.existsSync(dbPath) && !isSqliteFile(dbPath)) {
54
const backupPath = `${dbPath}.old`
0 commit comments