Skip to content

Commit

Permalink
fix(main: db): create app folder #14
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Apr 11, 2022
1 parent 2dbecaf commit 750637d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/services/db/index.ts
Expand Up @@ -35,7 +35,11 @@ const DEFAULT_FOLDER = {
const fileDb = store.preferences.get('storagePath') + `/${DB_NAME}`

export const createDb = () => {
if (fs.existsSync(fileDb)) return
if (fs.existsSync(fileDb)) {
return
} else {
fs.ensureFileSync(fileDb)
}

const db = {
folders: [...DEFAULT_SYSTEM_FOLDERS, DEFAULT_FOLDER],
Expand Down

0 comments on commit 750637d

Please sign in to comment.