v3.0.1: fix missing dir
This commit is contained in:
parent
c35d780321
commit
7c5a0a48ba
|
@ -22,7 +22,7 @@ module.exports.create = function (config={}) {
|
||||||
sequelize = new Sequelize(config.storeDatabaseUrl);
|
sequelize = new Sequelize(config.storeDatabaseUrl);
|
||||||
} else {
|
} else {
|
||||||
sequelize = new Promise(function (resolve, reject) {
|
sequelize = new Promise(function (resolve, reject) {
|
||||||
confDir = confDir.replace(/~\//, require('os').homedir());
|
confDir = confDir.replace(/~\//, require('os').homedir() + '/');
|
||||||
mkdirp(confDir, function (err) {
|
mkdirp(confDir, function (err) {
|
||||||
if (err) { reject(err); return; }
|
if (err) { reject(err); return; }
|
||||||
resolve(new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3' }));
|
resolve(new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3' }));
|
||||||
|
|
Loading…
Reference in New Issue