summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2013-08-27 13:02:00 +0530
committerAnand Avati <avati@redhat.com>2013-09-04 20:54:21 -0700
commite0fa0bb1b1e1758d2e68b4940939e87d438fa14f (patch)
treeffd1fa4fedcdee533ea3af6e220372f1667b3c27 /geo-replication
parentf201b46d1b20db1f2b11344e99db3381d9d4c1e1 (diff)
gsyncd / geo-rep: fix hardlink creation on slave
Change-Id: I20fbd518bf519cbf2362b97aeb8be7c3b105087a BUG: 1003805 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/5757 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Tested-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/resource.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index c3d31b78698..c7755a419a5 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -514,11 +514,12 @@ class Server(object):
elif op == 'MKDIR':
blob = entry_pack_mkdir(gfid, bname, e['stat'])
elif op == 'LINK':
- st = lstat(entry)
+ slink = os.path.join(pfx, gfid)
+ st = lstat(slink)
if isinstance(st, int):
blob = entry_pack_reg(gfid, bname, e['stat'])
else:
- errno_wrap(os.link, [os.path.join(pfx, gfid), entry], [ENOENT, EEXIST])
+ errno_wrap(os.link, [slink, entry], [ENOENT, EEXIST])
elif op == 'SYMLINK':
blob = entry_pack_symlink(gfid, bname, e['link'], e['stat'])
elif op == 'RENAME':