mv: Mv hardlinks windows should fail
Hi,
This PR is related to #5451, but not necessarily closes it. On windows, making a hardlink would not be recognized, but now it is:
# on windows
create file named hard_link_a
mkhardlink /H hard_link_b hard_link_a
Currently:
> mv hard_link_a hard_link_b
# removes hard_link_a
Now:
> mv hard_link_a hard_link_b
mv: 'hard_link_a' and 'hard_link_b' are the same file
Now with the issue related on case-insensitive OSs. Currently
touch a
mv a A
would succeed only on linux, but fail on both windows, macOs due to being case-insensitive Os. I have been trying to make it work across all OS, but changing the order of some of the error handling blows up some of the tests. Is that even something we want to support, or is the current behavior the intended one?
I have seen lots of issues with mv lately, including some I caused with my PR (sorry 😛 ) , so would like to improve at least the behavior of certain operations.
Basically I started trying to fix case-insensitive, ended up fixing moving hardlinks :P
GNU testsuite comparison:
Congrats! The gnu test tests/tail/symlink is no longer failing!
GNU testsuite comparison:
Congrats! The gnu test tests/tail/symlink is no longer failing!
What can we do to get this going? I believe it may be the only thing holding up integration of uu_mv into nushell. Any ideas @tertsdiepraam? Sorry to tag you. It's been a few weeks and it would be great to move forward with this.
I'll take a look :)
@tertsdiepraam See my comment for some of the doubts. Bit long, but well :(
Thanks again for your time always!