Fixed double dir path component extraction in save module (causing profile info save to fail).
This commit is contained in:
parent
11d702d322
commit
88425aee5b
|
@ -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