Fixed double dir path component extraction in save module (causing profile info save to fail).

This commit is contained in:
DebaucheryLibrarian 2024-09-11 05:16:54 +02:00
parent 766e4b5554
commit 4ac2dab56f
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ function save(filepath, streams, item) {
streams = [].concat(streams);
return Promise.resolve().then(() => {
return fs.ensureDir(path.dirname(pathComponents.dir));
return fs.ensureDir(pathComponents.dir);
}).then(() => {
return Promise.all(streams.map((stream, index) => {
const target = streams.length > 1 ? path.join(pathComponents.dir, `${pathComponents.name}-${index}${pathComponents.ext}`) : filepath;