From 2a93072e7c220a5a5fd4c201b82c26b9bab8f885 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Wed, 27 Jan 2021 00:46:31 -0700 Subject: [PATCH] whatever --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 3847170..4955331 100644 --- a/index.js +++ b/index.js @@ -115,7 +115,9 @@ async function thing() { album, artist, title, trackNum, file, image, } of files) { const path = `${os.homedir()}/Music/${album}/${artist} - ${title}.mp3`; - await fs.ensureDir(`${os.homedir()}/Music/${album}`); + try { + await fs.mkdir(`${os.homedir()}/Music/${album}`, { recursive: true }); + } catch (err) { } if (!(await fs.exists(path))) { console.log(`Encoding to: ${path}`);