summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-02 13:28:42 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-08-02 13:28:49 (GMT)
commit621ea848b09084415f8421119cfa6ad95adf002f (patch)
tree5800bfef865af5c877b9ac1f33bbb933eb0eafd8 /Source
parent8af9dea833d13bfbf401c6b51d6e06f411c1b1d9 (diff)
parenta4f1c0fac84aab713d89d842be244c7427e014bd (diff)
downloadCMake-621ea848b09084415f8421119cfa6ad95adf002f.zip
CMake-621ea848b09084415f8421119cfa6ad95adf002f.tar.gz
CMake-621ea848b09084415f8421119cfa6ad95adf002f.tar.bz2
Merge topic 'windows-symlink-dir'
a4f1c0fac8 Windows: Revert "Prefer junctions for directory symlinks" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7530
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 93a6f64..672cdc7 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -3357,22 +3357,12 @@ cmsys::Status cmSystemTools::CreateSymlink(std::string const& origName,
uv_fs_t req;
int flags = 0;
#if defined(_WIN32)
- bool const isDir = cmsys::SystemTools::FileIsDirectory(origName);
- if (isDir) {
- flags |= UV_FS_SYMLINK_JUNCTION;
+ if (cmsys::SystemTools::FileIsDirectory(origName)) {
+ flags |= UV_FS_SYMLINK_DIR;
}
#endif
int err = uv_fs_symlink(nullptr, &req, origName.c_str(), newName.c_str(),
flags, nullptr);
-#if defined(_WIN32)
- if (err && uv_fs_get_system_error(&req) == ERROR_NOT_SUPPORTED && isDir) {
- // Try fallback to symlink for network (requires additional permissions).
- flags ^= UV_FS_SYMLINK_JUNCTION | UV_FS_SYMLINK_DIR;
- err = uv_fs_symlink(nullptr, &req, origName.c_str(), newName.c_str(),
- flags, nullptr);
- }
-#endif
-
cmsys::Status status;
if (err) {
#if defined(_WIN32)