From 12394da3346dfd68ff295ad6206b6125e6b4a57e Mon Sep 17 00:00:00 2001 From: Evan Young Date: Sat, 22 Jan 2022 13:39:12 -0500 Subject: [PATCH] Fix failure on convert in modern Node.js Closes #30. --- lib/worm-scraper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worm-scraper.js b/lib/worm-scraper.js index c9579ab..5f34617 100644 --- a/lib/worm-scraper.js +++ b/lib/worm-scraper.js @@ -87,7 +87,7 @@ if (argv._.includes("download")) { if (argv._.includes("convert")) { commands.push(() => { - return fs.rmdir(chaptersPath, { recursive: true, maxRetries: 3 }) + return fs.rm(chaptersPath, { force: true, recursive: true, maxRetries: 3 }) .then(() => fs.mkdir(chaptersPath, { recursive: true })) .then(() => convert(cachePath, manifestPath, chaptersPath, argv.book, argv.jobs)); });