From 4ac2dab56f760068e728cfec2553813bb07935bf Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 11 Sep 2024 05:16:54 +0200 Subject: [PATCH] Fixed double dir path component extraction in save module (causing profile info save to fail). --- src/save/save.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/save/save.js b/src/save/save.js index f332582..0598c96 100644 --- a/src/save/save.js +++ b/src/save/save.js @@ -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;