ctdb-common: mkdir_p should not try to create .
authorAmitay Isaacs <amitay@gmail.com>
Tue, 17 Dec 2013 08:48:29 +0000 (19:48 +1100)
committerMartin Schwenke <martin@meltin.net>
Thu, 16 Jan 2014 00:41:12 +0000 (11:41 +1100)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/common/system_common.c

index 7563ff3f1bab08c40547c26e892af7d12e777c43..cc22f69e37cb9a4578230aa8e6d80f6b52eaa6d8 100644 (file)
@@ -169,6 +169,10 @@ int mkdir_p(const char *dir, int mode)
                return 0;
        }
 
+       if (strcmp(dir, ".") == 0) {
+               return 0;
+       }
+
        t = talloc_strdup(NULL, dir);
        if (t == NULL) {
                return ENOMEM;