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