You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copying files as symbolic links to a new (sub-)directory would require constructing a relative path from the new location to the old, e.g. starting with ../.
Trying to do so would necessarily be very fragile. GNU cp even refuses to attempt it. However, uutils currently does it, very badly, resulting in completely broken links and exit code 0.
$ mkdir newdir
$ cp -vs README.md newdir/ # GNU refuses to create broken symbolic links'README.md' -> 'newdir/README.md'cp: newdir/README.md: can make relative symbolic links only in current directory[$? = 1]
$ ls newdir/ # It's empty
$ cargo run -q cp -vs README.md newdir/ # uutils returns "success"'README.md' -> 'newdir/README.md'
$ ls newdir/ # And creates somethingREADME.md
$ readlink newdir/README.md # It creates a self-linkREADME.md
$ less newdir/README.md newdir/README.md: Too many levels of symbolic links[$? = 1]
Copying files as symbolic links to a new (sub-)directory would require constructing a relative path from the new location to the old, e.g. starting with
../
.Trying to do so would necessarily be very fragile. GNU
cp
even refuses to attempt it. However, uutils currently does it, very badly, resulting in completely broken links and exit code 0.Discovered while reviewing #6380.
The text was updated successfully, but these errors were encountered: