summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-08-28 00:14:47 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-02 10:30:33 -0700
commit2e96535c05a114fbefeb3c51cd29217176d61c65 (patch)
tree4bf45988c136778d5d8b619f69de58c796f675d6 /libglusterfsclient/src/libglusterfsclient.c
parent21d3084bc6b0ce572fc4136446d45c8ac0f647f8 (diff)
libglusterfsclient: Compare compcount with path not maxentry
When searching for an exact entry we need to compare the component counts in the candidate VMP and the count in the path being searched. This is opposite to the current situation where we compare the component count in VMP and the component count in maxentry, which will always be same. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 209 (VMP parsing through fstab has issues) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=209
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index e3fdbe4..f1a5136 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -1443,6 +1443,7 @@ _libgf_vmp_search_entry (char *path, int searchtype)
vmpcompcount = 0;
if ((searchtype == LIBGF_VMP_EXACT) && (maxentry)) {
vmpcompcount = libgf_count_path_components (maxentry->vmp);
+ matchcount = libgf_count_path_components (path);
if (vmpcompcount != matchcount)
maxentry = NULL;
}