From 20d035a5c695048ed10085a667fc5cd18887397c Mon Sep 17 00:00:00 2001 From: WongXX Date: Sun, 26 May 2024 01:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=BE=A9=E6=AA=A2=E6=9F=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=BEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fd51f4f..8754137 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,7 @@ async function main() { Object.keys(objects).forEach(element => { let hash = objects[element].hash; let distfilepath = join(distpath, element); - if (!distfilepath) { + if (!fs.existsSync(distfilepath)) { fs.mkdirSync(distfilepath, { recursive: true }); } fs.renameSync(join(srcpath, hash.substring(0, 2), hash), distfilepath);