summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 6dcda493201..848bda9b524 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -3369,6 +3369,12 @@ glusterfs_mkdir (glusterfs_handle_t handle,
goto out;
}
+ op_ret = libgf_client_path_lookup (&loc, ctx, 0);
+ if (op_ret == -1) {
+ errno = ENOENT;
+ goto out;
+ }
+
pathname = strdup (path);
name = basename (pathname);