Fix #7: inconsistent return value in mkpath()

When the required `dir` argument is missing `mkpath()` inconsistently
returns 1 instead of -1.  Found by @jesponde

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-10-31 00:33:19 +01:00
1 parent 6daebf4ea4
commit be6f276557
1 file changed
+1 -1
+1 -1
View File
@@ -35,7 +35,7 @@ int mkpath(char *dir, mode_t mode)
if (!dir) {
errno = EINVAL;
return 1;
return -1;
}
if (!stat(dir, &sb))