Open xmsz-stu opened 6 months ago
const a = new Downloader({ url: 'xxx', directory: 'c:/', }).download().then(console.log).catch(console.error);
operation not permitted mkdir c:\
I saw https://github.com/ibrod83/nodejs-file-downloader/blob/0cc96f11b6d6e4879855681db97a54c9ba9840c4/Download.js#L175
why need to mkdir dir?
Yes this is a flaw. I'm always calling mkdir to make sure the directory exists. I didn't account for cases like yours, when such a dir cannot be created.
I saw https://github.com/ibrod83/nodejs-file-downloader/blob/0cc96f11b6d6e4879855681db97a54c9ba9840c4/Download.js#L175
why need to mkdir dir?