-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cp: Fix broken symlinks to parent-dir
According to the GNU cp official documentation[1], a symlink is only created if all source paths are absolute, unless the destination files are in the current directory. This fix solves this GNU cp incompatibility by: - Adding verifications when handling symlinks, to ensure that a symlink with relative path are only created if the destination is within the current directory. - Adding unit tests to cover this modifications, and ensure the behavior is correctly align with GNU documentation. [1]: https://www.gnu.org/software/coreutils/manual/html_node/cp-invocation.html#index-_002ds-16
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters