summaryrefslogtreecommitdiffstats
path: root/xlators/features/index/src/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/index/src/index.c')
-rw-r--r--xlators/features/index/src/index.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 975d5f998bd..e5e1c986fcc 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -2323,6 +2323,14 @@ init (xlator_t *this)
}
GF_OPTION_INIT ("index-base", priv->index_basepath, path, out);
+ if (gf_lstat_dir (priv->index_basepath, NULL) != 0) {
+ ret = -1;
+ gf_msg (this->name, GF_LOG_ERROR, errno,
+ INDEX_MSG_INDEX_DIR_CREATE_FAILED,
+ "Failed to find index basepath %s.",
+ priv->index_basepath);
+ goto out;
+ }
GF_OPTION_INIT ("xattrop64-watchlist", watchlist, str, out);
ret = index_make_xattrop_watchlist (this, priv, watchlist,