summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/store.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libglusterfs/src/store.c b/libglusterfs/src/store.c
index fe4401d0355..f444741ef0c 100644
--- a/libglusterfs/src/store.c
+++ b/libglusterfs/src/store.c
@@ -453,9 +453,18 @@ int
gf_store_handle_retrieve(char *path, gf_store_handle_t **handle)
{
int32_t ret = -1;
+ struct stat statbuf = {0};
+ ret = sys_stat(path, &statbuf);
+ if (ret) {
+ gf_msg("", GF_LOG_ERROR, errno, LG_MSG_PATH_NOT_FOUND,
+ "Path "
+ "corresponding to %s.",
+ path);
+ goto out;
+ }
ret = gf_store_handle_new(path, handle);
-
+out:
gf_msg_debug("", 0, "Returning %d", ret);
return ret;
}