lib/param Print error when mkdir of lock path fails
[amitay/samba.git] / lib / param / util.c
index a385c4d0f34ae81bb93525fb7c07d529bad7e0c1..3a6a004043da6b94b32f8a5b993e7231ef3f96c0 100644 (file)
@@ -90,7 +90,9 @@ char *lpcfg_lock_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
        trim_string(dname,"","/");
        
        if (!directory_exist(dname)) {
-               mkdir(dname,0755);
+               if (!mkdir(dname,0755))
+                       DEBUG(1, ("Unable to create directory %s for file %s. "
+                             "Error was %s\n", dname, name, strerror(errno)));
        }
        
        fname = talloc_asprintf(mem_ctx, "%s/%s", dname, name);