Closed joliss closed 10 years ago
We are using ncp
within the Broccoli build tool (it works wonderfully), and are waiting for this PR (and the subsequent release) to pull the trigger on a significant performance fix which involves using symlinks when possible.
@AvianFlu - Would love a review and +1/-1 here.
Awesome, thanks!
Thanks @AvianFlu, for the quick release as well!
Hey @AvianFlu, this is the pull request for the "inflate symlinks" option I asked you about on IRC. Unix
cp
has a--dereference
option, so I decided to call it "dereference" rather than "inflateSymlinks" to stick with the established terminology.I also added tests for the default (dereference=false) symlink handling while I was at it.
When dereference=true, we consider broken symlinks to be errors. (The
fs.stat
call will return an ENOENT error when it encounters a broken symlink, and we simply don't attempt to handle this.) This mimics the behavior of Unixcp
's--dereference
.The first commit is mostly a massive re-indent; all the important stuff is in the second commit.