You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/07/11 01:39:01 UTC
[15/50] mesos git commit: Windows: Updated `CreateSymbolicLink()` to
support long paths.
Windows: Updated `CreateSymbolicLink()` to support long paths.
Review: https://reviews.apache.org/r/60307/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d107bb7a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d107bb7a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d107bb7a
Branch: refs/heads/master
Commit: d107bb7a0c00f7f747a04c490a8fe114bb371505
Parents: 28fd210
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Wed Jul 5 17:35:48 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Jul 10 17:15:33 2017 -0700
----------------------------------------------------------------------
.../stout/include/stout/internal/windows/reparsepoint.hpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/d107bb7a/3rdparty/stout/include/stout/internal/windows/reparsepoint.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/internal/windows/reparsepoint.hpp b/3rdparty/stout/include/stout/internal/windows/reparsepoint.hpp
index 61c4084..3a1ea16 100644
--- a/3rdparty/stout/include/stout/internal/windows/reparsepoint.hpp
+++ b/3rdparty/stout/include/stout/internal/windows/reparsepoint.hpp
@@ -330,10 +330,12 @@ inline Try<Nothing> create_symbolic_link(
// [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=vs.85).aspx
static std::mutex adjust_privileges_mutex;
synchronized(adjust_privileges_mutex) {
- if (!::CreateSymbolicLink(
- reparse_point.c_str(), // path to the symbolic link
- target.c_str(), // symlink target
- target_is_folder ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0)) {
+ if (!::CreateSymbolicLinkW(
+ // Path to link.
+ longpath(real_reparse_point_path.get()).data(),
+ // Path to target.
+ longpath(real_target_path.get()).data(),
+ target_is_folder ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0)) {
return WindowsError(
"'internal::windows::create_symbolic_link': 'CreateSymbolicLink' "
"call failed");