Skip to content

Commit 44bb133

Browse files
Alexpuxlazka
authored andcommitted
Don't create WSL symlinks for MSYS2
1 parent cf71f99 commit 44bb133

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

winsup/cygwin/path.cc

+4
Original file line numberDiff line numberDiff line change
@@ -1955,6 +1955,7 @@ typedef struct _REPARSE_LX_SYMLINK_BUFFER
19551955
} LxSymlinkReparseBuffer;
19561956
} REPARSE_LX_SYMLINK_BUFFER,*PREPARSE_LX_SYMLINK_BUFFER;
19571957

1958+
#ifndef __MSYS__
19581959
static int
19591960
symlink_wsl (const char *oldpath, path_conv &win32_newpath)
19601961
{
@@ -2025,6 +2026,7 @@ symlink_wsl (const char *oldpath, path_conv &win32_newpath)
20252026
NtClose (fh);
20262027
return 0;
20272028
}
2029+
#endif
20282030

20292031
int
20302032
symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
@@ -2109,6 +2111,7 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
21092111
}
21102112
/* Otherwise, fall back to default symlink type. */
21112113
wsym_type = WSYM_sysfile;
2114+
#ifndef __MSYS__
21122115
fallthrough;
21132116
case WSYM_sysfile:
21142117
if (win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS)
@@ -2120,6 +2123,7 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
21202123
/* On FSes not supporting reparse points, or in case of an error
21212124
creating the WSL symlink, fall back to creating the plain old
21222125
SYSTEM file symlink. */
2126+
#endif
21232127
break;
21242128
default:
21252129
break;

0 commit comments

Comments
 (0)