-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
fs.cp/fs.cpSync convert relative symlinks to absolute symlinks #41693
Comments
Closes nodejs#41693 Signed-off-by: Marcos Bjoerkelund <[email protected]>
Closes nodejs#41693 Signed-off-by: Marcos Bjoerkelund <[email protected]>
Fixes: nodejs#41693 Signed-off-by: Marcos Bjoerkelund <[email protected]>
To clarify, what should be the result of copying |
@tniessen I agree that in this case it would not make sense. In our case, we were finding issues because we were distributing a folder created as a result of I sent a proposal in #41819 to implement this feature, which could be enabled by passing |
I am going to mark this as a feature request, not a bug, then. |
Fixes: #41693 PR-URL: #41819 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Fixes: nodejs#41693 PR-URL: nodejs#41819 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Fixes: #41693 PR-URL: #41819 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Fixes: #41693 PR-URL: #41819 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Fixes: nodejs#41693 PR-URL: nodejs#41819 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Fixes: #41693 PR-URL: #41819 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Version
v16.13.2
Platform
Subsystem
No response
What steps will reproduce the bug?
Create the following folder structure (see example code below):
This can be achieved with the following commands:
Afterwards, execute the following command in your Node.js console:
How often does it reproduce? Is there a required condition?
This happens in all Node.js releases from 16.7.0, where
fs.cp
andfs.cpSync
are supported.What is the expected behavior?
Given the above example, it would be expected for the
test2
folder to contain a relative symlinkbar
, same thantest1
, since the action is expected to replicate the entire structure from one folder to another, i.e.:What do you see instead?
Given the above example, the symlinks are converted to absolute symlinks, and also pointing to the "previous" path, i.e.:
Additional information
No response
The text was updated successfully, but these errors were encountered: