summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index f3df8e2aeaf..1bded6d3d11 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -680,7 +680,9 @@ loc_copy_overload_parent (loc_t *dst, loc_t *src, inode_t *parent)
dst->name = strrchr (dst->path, '/');
if (dst->name)
dst->name++;
- }
+ } else if (src->name) {
+ dst->name = src->name;
+ }
ret = 0;
out:
@@ -718,7 +720,9 @@ loc_copy (loc_t *dst, loc_t *src)
dst->name = strrchr (dst->path, '/');
if (dst->name)
dst->name++;
- }
+ } else if (src->name) {
+ dst->name = src->name;
+ }
ret = 0;
out: