Fixed double dir path component extraction in save module (causing profile info save to fail).
This commit is contained in:
parent
766e4b5554
commit
4ac2dab56f
|
@ -11,7 +11,7 @@ function save(filepath, streams, item) {
|
||||||
streams = [].concat(streams);
|
streams = [].concat(streams);
|
||||||
|
|
||||||
return Promise.resolve().then(() => {
|
return Promise.resolve().then(() => {
|
||||||
return fs.ensureDir(path.dirname(pathComponents.dir));
|
return fs.ensureDir(pathComponents.dir);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
return Promise.all(streams.map((stream, index) => {
|
return Promise.all(streams.map((stream, index) => {
|
||||||
const target = streams.length > 1 ? path.join(pathComponents.dir, `${pathComponents.name}-${index}${pathComponents.ext}`) : filepath;
|
const target = streams.length > 1 ? path.join(pathComponents.dir, `${pathComponents.name}-${index}${pathComponents.ext}`) : filepath;
|
||||||
|
|
Loading…
Reference in New Issue