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" option deletes previous files instead of unlinking #9

Open
EvHaus opened this issue Apr 23, 2014 · 4 comments
Open

"overwrite" option deletes previous files instead of unlinking #9

EvHaus opened this issue Apr 23, 2014 · 4 comments

Comments

@EvHaus
Copy link

EvHaus commented Apr 23, 2014

When using the options.overwrite = true option I'm seeing a very undesirable behavior.

Instead of unlinking the old link before overwriting it, it actually deletes the files for the old link. This is not the expected behavior.

Can you please change the command to perform an "unlink" command instead of an "rm" command?

@schnittstabil
Copy link

Mhm, grunt-contrib-symlink calls grunt.file.delete, which in turn calls rimraf.sync, which in turn calls fs.unlinkSync.

Sorry, but therefore I don't understand what you expect. How does unlink differ from rm, respectively about what undesirable behavior do you think of?

@EvHaus
Copy link
Author

EvHaus commented Feb 19, 2015

unlink removes the symlink to the original files, where as rm actually removes the original files themselves.

@schnittstabil
Copy link

I see. Unlinking the link, instead of unlinking the linked. :neckbeard:
Sorry, but I can't reproduce that behaviour you described, see my simple test.
Maybe it is already solved?

@CTaylor1118
Copy link

I am seeing this behavior when I have sources set like ['**/*'] and overwrite set to true.

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

3 participants