Fix relative symlinks#282
Fix relative symlinks#282nfischer merged 4 commits intoshelljs:masterfrom freitagbr:fix-relative-symlinks
Conversation
|
I based this PR on Schoonology's fix (PR #235), removing the warning that is displayed when a symbolic link is created. |
|
@freitagbr Could you check that this works under node v0.10? It seems to be failing on the CI. |
|
Also, would you be able to squash the commits? See here |
|
The Node.js v0.10 |
|
The usual method we use is to check for its existence, and if it doesn't exist, use a workaround. Would that be feasible? That way we can use |
|
As long as the source string does not start with a |
|
Will that play well with Windows? I think that should be sufficient for *nix though (unless |
|
This should work as intended, though |
|
I'm working on a PR for the tilde (currently unsupported), but there are some other big changes I want to get merged first. So don't add support for it just yet. Once we do, we'll have to add an "is absolute path" method that handles the tilde |
|
Could you also add some invalid test cases toward the top? |
|
@freitagbr: Any chance I could ask you to add the small changes? I'd really like to include this in the next release. Thanks! |
|
@ariporad Will do! I'll have this done by the end of the day. |
|
👍 @freitagbr just ping this thread when you have the tests merged in and I'll review |
|
@freitagbr: Thanks, but no rush! Ari On Sun, Jan 24, 2016 at 2:41 PM, Nate Fischer notifications@github.com
|
When creating a symlink with a relative path, e.g. `ln('-s', '../baz.txt', 'foo/bar/link')`,
the link will be created releative to the destination directory, not to the
current working directory of the node process. Also added tests for
functionality.
|
@freitagbr then my only other comment is the invalid test cases (#282 (comment)). Once those are in, this'll be good! |
There was a problem hiding this comment.
In testing, I found that the source file was not checked properly for hard links. This correctly checks if the source exists for hard links.
|
@freitagbr nice work! LGTM |
|
👍 |
Fixes #100