Skip to content

Commit f31004f

Browse files
committed
fixup! Don't create WSL symlinks for MSYS2
Cygwin started to use WSL-style symbolic links by default. Since MSYS2 decided to patch the `WSYM_sysfile` mode to make deep copies instead, that logic had to be disabled specifically. But now that we introduced a separate mode (`WSYM_deepcopy`) for that, and use that by default, we can re-enable Cygwin's code so that users wishing to experience Cygwin's symbolic link behavior can do so by setting `MSYS=winsymlinks:sysfile`. Essentially, this drops the patch "Don't create WSL symlinks for MSYS2". Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 48205eb commit f31004f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

winsup/cygwin/path.cc

-4
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,6 @@ typedef struct _REPARSE_LX_SYMLINK_BUFFER
19581958
} LxSymlinkReparseBuffer;
19591959
} REPARSE_LX_SYMLINK_BUFFER,*PREPARSE_LX_SYMLINK_BUFFER;
19601960

1961-
#ifndef __MSYS__
19621961
static int
19631962
symlink_wsl (const char *oldpath, path_conv &win32_newpath)
19641963
{
@@ -2029,7 +2028,6 @@ symlink_wsl (const char *oldpath, path_conv &win32_newpath)
20292028
NtClose (fh);
20302029
return 0;
20312030
}
2032-
#endif
20332031

20342032
int
20352033
symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
@@ -2114,7 +2112,6 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
21142112
}
21152113
/* Otherwise, fall back to default symlink type. */
21162114
wsym_type = WSYM_sysfile;
2117-
#ifndef __MSYS__
21182115
fallthrough;
21192116
case WSYM_sysfile:
21202117
if (win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS)
@@ -2126,7 +2123,6 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
21262123
/* On FSes not supporting reparse points, or in case of an error
21272124
creating the WSL symlink, fall back to creating the plain old
21282125
SYSTEM file symlink. */
2129-
#endif
21302126
break;
21312127
default:
21322128
break;

0 commit comments

Comments
 (0)