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}`);