Skip to content

Commit 0c2b020

Browse files
committed
fileops: correct error return on p_lstat failures when mkdir
IIRC I got a strange return once from lstat, which translated in a weird error class/message being reported. As a safety measure, enforce a -1 return in that case.
1 parent 5d773a1 commit 0c2b020

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/futils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ int git_futils_mkdir(
476476
break;
477477
} else if (errno != ENOENT) {
478478
git_error_set(GIT_ERROR_OS, "failed to stat '%s'", parent_path.ptr);
479+
error = -1;
479480
goto done;
480481
}
481482

0 commit comments

Comments
 (0)