Skip to content

Commit ba324ce

Browse files
Matthew Dillonliweitianux
authored andcommitted
cpdup - Add support for lchmod(), lutimes(), and lchflags() (2)
* Fix bug in xlink, lchflags() was being called with the wrong path after a link failure and so could not unlock schg files to link to them.
1 parent 02920eb commit ba324ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cpdup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1803,7 +1803,7 @@ xlink(const char *src, const char *dst, u_long flags __unused)
18031803
if ((r = hc_link(&DstHost, src, dst)) < 0) {
18041804
#ifdef _ST_FLAGS_PRESENT_
18051805
if (DstHost.version >= HCPROTO_VERSION_LUCC)
1806-
hc_lchflags(&DstHost, dst, 0);
1806+
hc_lchflags(&DstHost, src, 0);
18071807
else
18081808
hc_chflags(&DstHost, src, 0);
18091809
r = hc_link(&DstHost, src, dst);

0 commit comments

Comments
 (0)