-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ln
: last argument not treated as a directory when -n
and -f
are used together
#5974
Labels
Comments
Thanks for the detailed report! I think there's indeed some faulty logic in this function: https:/uutils/coreutils/blob/main/src/uu/ln/src/ln.rs#L295 Do you want try to submit a fix? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using uutils, running
results in an error that says
whereas, using GNU coreutils, the result is that the symlinks
c/a
andc/b
are created successfully. However, if you run it whenc
doesn't exist, or when it is a file, both give an error sayingln
is not a directory. If you use-n
without-f
, or vice versa, the symlinks are created with no problems using both versions.I'm not entirely sure what's going on here. When
c/
is a directory, its appears to want it to be a non-existing destination file to link to, whereas whenc
either doesn't exist or is a file, it wants it to be a directory to put the link into.Furthermore, when
c/
is a directory, the first one fails with a simple error saying the destination already exists, but the second one fails with an error that suggests it thinks linkinga
toc
actually worked, and it just doesn't want to overwrite the same file twice.uutils: 0.0.24
GNU: 9.4
Platform: Gentoo Linux
The text was updated successfully, but these errors were encountered: