summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/index/src/index.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 84c22c072b4..5d59b22aed5 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -1199,9 +1199,16 @@ index_get_gfid_type (void *opaque)
int ret = 0;
list_for_each_entry (entry, &args->entries->list, list) {
+ if (strcmp (entry->d_name, ".") == 0 ||
+ strcmp (entry->d_name, "..") == 0)
+ continue;
+
loc_wipe (&loc);
- gf_uuid_parse (entry->d_name, loc.gfid);
+
entry->d_type = IA_INVAL;
+ if (gf_uuid_parse (entry->d_name, loc.gfid))
+ continue;
+
loc.inode = inode_find (args->parent->table, loc.gfid);
if (loc.inode) {
entry->d_type = loc.inode->ia_type;