summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2017-07-21 12:14:25 +0530
committersoumya k <skoduri@redhat.com>2017-08-02 12:09:54 +0000
commit5c433f8f5834a4cae62d0375bfdb273242630f01 (patch)
treeb66101c9bd8775a0c0bacb1e3c65fd952dfdc6a8 /api
parent0cc24da2fd79dd8680b771475d2192db0b63e7de (diff)
tests/gfapi : add test case for nameless lookups in glfs_resolve_component()
Plus address pending comment to add check for entry "" in glfs_resolve_component() Change-Id: I6063f776ce1cd76cb4c1b1f621b064f3dcc91e5c BUG: 1460514 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: https://review.gluster.org/17844 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-resolve.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index 8e91cd71c20..76835cbaebd 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -282,7 +282,8 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent,
if (__is_root_gfid (parent->gfid) &&
((strcmp (component, ".") == 0) ||
- (strcmp (component, "..") == 0))) {
+ (strcmp (component, "..") == 0) ||
+ (strcmp (component, "") == 0))) {
if (!force_lookup) {
inode = inode_ref (parent);
} else {