Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite/replace existing file #12

Open
Kinzi opened this issue Feb 22, 2017 · 2 comments
Open

Overwrite/replace existing file #12

Kinzi opened this issue Feb 22, 2017 · 2 comments

Comments

@Kinzi
Copy link

Kinzi commented Feb 22, 2017

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?

@rosshinkley
Copy link
Owner

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!

@Kinzi
Copy link
Author

Kinzi commented Feb 25, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants