nightmare-download-manager icon indicating copy to clipboard operation
nightmare-download-manager copied to clipboard

Overwrite/replace existing file

Open Kinzi opened this issue 8 years ago • 2 comments

When downloading some new content into an existing file it seems like the file is not overwritten.( i.e. still has the original content)

Would be nice if you could implement this feature. Maybe with a force:true option or something?

Kinzi avatar Feb 22 '17 05:02 Kinzi

I'll certainly look into it! I would have expected the file to get overwritten, too. I don't think there's a test case for this; I'll certainly have to add one. Thanks for pointing it out!

rosshinkley avatar Feb 24 '17 16:02 rosshinkley

I think problem is the fs.move() in line 34. If you update 'fs-extra' to 2.0 you can use overwrite:true option. See here: https://github.com/jprichardson/node-fs-extra/blob/master/docs/move.md

Kinzi avatar Feb 25 '17 03:02 Kinzi