Skip to content

Commit fceed92

Browse files
committed
fixup! Instead of creating Cygwin symlinks, use deep copy by default
Signed-off-by: Jeremy Drake <[email protected]>
1 parent 733cb1f commit fceed92

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

winsup/cygwin/path.cc

+1-19
Original file line numberDiff line numberDiff line change
@@ -2212,25 +2212,7 @@ symlink_deepcopy (const char *oldpath, path_conv &win32_newpath)
22122212
tmp_pathbuf tp;
22132213
path_conv win32_oldpath;
22142214

2215-
/* **BEGIN** replace this with
2216-
resolve_symlink_target (oldpath, win32_newpath. win32_oldpath);
2217-
when rebasing over 5a706ff0fceb83fd1fe7f072fc28a741fdde65f2
2218-
(probably Cygwin 3.6) */
2219-
/* The symlink target is relative to the directory in which the
2220-
symlink gets created, not relative to the cwd. Therefore we
2221-
have to mangle the path quite a bit before calling path_conv.*/
2222-
if (isabspath (oldpath))
2223-
win32_oldpath.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
2224-
else
2225-
{
2226-
size_t len = strrchr (win32_newpath.get_posix (), '/')
2227-
- win32_newpath.get_posix () + 1;
2228-
char *absoldpath = tp.t_get ();
2229-
stpcpy (stpncpy (absoldpath, win32_newpath.get_posix (), len),
2230-
oldpath);
2231-
win32_oldpath.check (absoldpath, PC_SYM_NOFOLLOW, stat_suffixes);
2232-
}
2233-
/* **END** */
2215+
resolve_symlink_target (oldpath, win32_newpath, win32_oldpath);
22342216
if (win32_oldpath.error)
22352217
{
22362218
set_errno (win32_oldpath.error);

0 commit comments

Comments
 (0)