Open Joshua-Schroijen opened 1 month ago
On MSYS2 v3.4.10 the latter symlink gets created:
saukrs@DESKTOP-O7JE7JE MSYS /c/betts/underscores/aiding/elegance/arginine/turkmen/ballet/bumsen/bendigo/steam/chronically/kannur/source/stalled/mangled/toolkit/strength/fateful/kurosawa/effectiveness/yardage/newport/repairers/prawn/angela/resembles/projekt/avalanche/storedge/alibi/gauteng/chaim/estudio/zante/thickened/retention/wieder/pretzel/maastricht/speciality/universalist/heine/nagios/spans/meetup/binders/strict/tooltip/beastiality/terrace
$ ll foo
lrwxrwxrwx 1 saukrs None 17 May 25 19:43 foo -> ../../beastiality
... but its' content is quite strange: instead of ..
it points to ../../beastiality
which logically is the same.
At least that's happening on my setup:
saukrs@DESKTOP-O7JE7JE MSYS /c/foo
$ uname -a
MSYS_NT-10.0-19044 DESKTOP-O7JE7JE 3.4.10.x86_64 2023-12-22 10:06 UTC x86_64 Msys
saukrs@DESKTOP-O7JE7JE MSYS /c/foo
$ echo $MSYS
winsymlinks:nativestrict
Cygwin 3.4.10 works as expected:
saukrs@DESKTOP-O7JE7JE /cygdrive/c/betts/underscores/aiding/elegance/arginine/turkmen/ballet/bumsen/bendigo/steam/chronically/kannur/source/stalled/mangled/toolkit/strength/fateful/kurosawa/effectiveness/yardage/newport/repairers/prawn/angela/resembles/projekt/avalanche/storedge/alibi/gauteng/chaim/estudio/zante/thickened/retention/wieder/pretzel/maastricht/speciality/universalist/heine/nagios/spans/meetup/binders/strict/tooltip/beastiality/terrace
$ ln -sv .. foo
'foo' -> '..'
saukrs@DESKTOP-O7JE7JE /cygdrive/c/betts/underscores/aiding/elegance/arginine/turkmen/ballet/bumsen/bendigo/steam/chronically/kannur/source/stalled/mangled/toolkit/strength/fateful/kurosawa/effectiveness/yardage/newport/repairers/prawn/angela/resembles/projekt/avalanche/storedge/alibi/gauteng/chaim/estudio/zante/thickened/retention/wieder/pretzel/maastricht/speciality/universalist/heine/nagios/spans/meetup/binders/strict/tooltip/beastiality/terrace
$ ll foo
lrwxrwxrwx 1 saukrs None 2 May 25 20:04 foo -> ..
saukrs@DESKTOP-O7JE7JE /cygdrive/c/betts/underscores/aiding/elegance/arginine/turkmen/ballet/bumsen/bendigo/steam/chronically/kannur/source/stalled/mangled/toolkit/strength/fateful/kurosawa/effectiveness/yardage/newport/repairers/prawn/angela/resembles/projekt/avalanche/storedge/alibi/gauteng/chaim/estudio/zante/thickened/retention/wieder/pretzel/maastricht/speciality/universalist/heine/nagios/spans/meetup/binders/strict/tooltip/beastiality/terrace
$ uname -a
CYGWIN_NT-10.0-19044 DESKTOP-O7JE7JE 3.4.10-1.x86_64 2023-11-29 12:12 UTC x86_64 Cygwin
Hello!
I have noticed a strange issue with using
ln -s
inside of MSYS2 which I'm inclined to consider a bug. Even after I enabled long paths inside of the Windows registryln -s
will complain about paths being too long to symlink to and will exit with an error code of 1 when creating symlinks to directories. The strange thing is that this also happens when the paths are far less than 260 characters long. If the paths are short enough, the symlink will be created regardless of the error. If the path is longer than 260 characters, the symlink will not be created.Steps to reproduce
Run the following commands inside of MSYS2 after enabling long paths in the Windows registry and rebooting:
MSYS2 Version
uname -a
for my MSYS2 installation:Implications
This bug can cause many kinds of frustrating problems because many shell scripts and tools like
tar
often need to create symlinks to other directoriesI thank you in advance for investigating this bug!