mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 19:52:10 +08:00
storage
This commit is contained in:
3
app.js
3
app.js
@@ -9,6 +9,8 @@ const path = require('path');
|
||||
const lowdb = require('lowdb');
|
||||
const FileSync = require('lowdb/adapters/FileSync');
|
||||
const utils = require('./app/utils/utils');
|
||||
const os = require('os');
|
||||
const storageDir = path.normalize(os.homedir() + '/electron-egg-storage/');
|
||||
|
||||
class AppBootHook {
|
||||
constructor(app) {
|
||||
@@ -39,7 +41,6 @@ class AppBootHook {
|
||||
// Worker is ready, can do some things
|
||||
// don't need to block the app boot.
|
||||
// 数据库
|
||||
const storageDir = path.normalize('./storage/');
|
||||
if (!fs.existsSync(storageDir)) {
|
||||
utils.mkdir(storageDir);
|
||||
utils.chmodPath(storageDir, '777');
|
||||
|
||||
Reference in New Issue
Block a user