mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 19:52:10 +08:00
1
This commit is contained in:
5
app.js
5
app.js
@@ -45,11 +45,10 @@ class AppBootHook {
|
||||
utils.chmodPath(storageDir, '777');
|
||||
}
|
||||
const file = storageDir + 'db.json';
|
||||
// utils.chmodPath(file);
|
||||
const adapter = new FileSync(file);
|
||||
const db = lowdb(adapter);
|
||||
if (!db.has('kv').value()) {
|
||||
db.set('kv', {}).write();
|
||||
if (!db.has('default').value()) {
|
||||
db.set('default', {}).write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user