fixed problem creating node storage directory
This commit is contained in:
parent
26be6411b5
commit
4a237b0703
|
@ -9,6 +9,11 @@ var sessionsdir = path.join(oauth3dir, 'sessions');
|
||||||
var directivesdir = path.join(oauth3dir, 'directives');
|
var directivesdir = path.join(oauth3dir, 'directives');
|
||||||
var metadir = path.join(oauth3dir, 'meta');
|
var metadir = path.join(oauth3dir, 'meta');
|
||||||
|
|
||||||
|
// We can reasonably assume the existence of the home directory, but we can't assume
|
||||||
|
// that there will already be a `.oauth3` directory or anything inside of it.
|
||||||
|
if (!fs.existsSync(path.join(oauth3dir, '..'))) {
|
||||||
|
fs.mkdirSync(path.join(oauth3dir, '..'));
|
||||||
|
}
|
||||||
if (!fs.existsSync(oauth3dir)) {
|
if (!fs.existsSync(oauth3dir)) {
|
||||||
fs.mkdirSync(oauth3dir);
|
fs.mkdirSync(oauth3dir);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue