From c731e0790f6e6bd013a61a54e6daa0fbae385285 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Fri, 28 Feb 2020 18:28:04 +0800 Subject: [PATCH] remove double extension #265 --- src/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.js b/src/util.js index 7715febe..b32da667 100644 --- a/src/util.js +++ b/src/util.js @@ -45,9 +45,9 @@ function getOutDir(customOutDir, filePath) { function getOutPath(customOutDir, filePath, nameSuffix) { if (!filePath) return undefined; - const basename = path.basename(filePath); + const parsed = path.parse(filePath); - return path.join(getOutDir(customOutDir, filePath), `${basename}-${nameSuffix}`); + return path.join(getOutDir(customOutDir, filePath), `${parsed.name}-${nameSuffix}`); } async function transferTimestamps(inPath, outPath) {