Skip to content

Fix relative symlink target generation#168

Open
karreiro wants to merge 1 commit into
ruby:masterfrom
karreiro:fix-ln-s-relative-empty-target
Open

Fix relative symlink target generation#168
karreiro wants to merge 1 commit into
ruby:masterfrom
karreiro:fix-ln-s-relative-empty-target

Conversation

@karreiro

Copy link
Copy Markdown

Fixes #129

Fix FileUtils.ln_s(..., relative: true) when the destination is a symlinked directory and the correct relative target must traverse upward with ...

The previous realpath-shortening step could choose an empty relative target in this shape. That produced a mangled command such as an empty ln -s source instead of keeping the lexical .. path.

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

Successfully merging this pull request may close these issues.

Mangled generated path on ln_s with relative: true

1 participant