Commit 128230ba by Etienne Samson Committed by Patrick Steinhardt

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.
parent 7ce231ff
...@@ -476,6 +476,7 @@ int git_futils_mkdir( ...@@ -476,6 +476,7 @@ int git_futils_mkdir(
break; break;
} else if (errno != ENOENT) { } else if (errno != ENOENT) {
git_error_set(GIT_ERROR_OS, "failed to stat '%s'", parent_path.ptr); git_error_set(GIT_ERROR_OS, "failed to stat '%s'", parent_path.ptr);
error = -1;
goto done; goto done;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment