mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-17 08:38:18 +00:00
登录后判断是否有数据文件夹, 如果没有, 则新建之
nw.gui为什么不存在?
This commit is contained in:
16
node_modules/evt.js
generated
vendored
16
node_modules/evt.js
generated
vendored
@@ -1,7 +1,20 @@
|
||||
var fs = require('fs');
|
||||
var User = require('user');
|
||||
|
||||
function log(o) {console.log(o)}
|
||||
function log(o) {
|
||||
console.log(o);
|
||||
};
|
||||
|
||||
// 为什么不存在?
|
||||
// var dataBasePath = require('nw.gui').App.dataPath; // + '/data';
|
||||
/*
|
||||
// 判断是否存在, 不存在则创建dir
|
||||
if(!fs.existsSync(dataBasePath)) {
|
||||
fs.mkdirSync(dataBasePath);
|
||||
}
|
||||
*/
|
||||
dataBasePath = '';
|
||||
|
||||
var Evt = {
|
||||
leanoteUrl: 'http://localhost:9000',
|
||||
port: 8008,
|
||||
@@ -14,6 +27,7 @@ var Evt = {
|
||||
},
|
||||
// 项目绝对地址
|
||||
getBasePath: function() {
|
||||
// return dataBasePath; // process.cwd();
|
||||
return process.cwd();
|
||||
},
|
||||
getAbsolutePath: function(relative) {
|
||||
|
Reference in New Issue
Block a user