mirror of
https://github.com/troglobit/libite.git
synced 2026-10-14 10:19:31 +00:00
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:
1 parent
6daebf4ea4
commit
be6f276557
1 file changed
+1
-1
+1
-1
@@ -35,7 +35,7 @@ int mkpath(char *dir, mode_t mode)
|
||||
|
||||
if (!dir) {
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!stat(dir, &sb))
|
||||
|
||||
Reference in new issue
Block a user