Skip to content

Commit

Permalink
path: Make git_path_prettify() properly handle ENOTDIR errno value
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltoken committed May 8, 2012
1 parent cb0ce16 commit 4681156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ int git_path_prettify(git_buf *path_out, const char *path, const char *base)
if (p_realpath(path, buf) == NULL) {
giterr_set(GITERR_OS, "Failed to resolve path '%s'", path);
git_buf_clear(path_out);
return (errno == ENOENT) ? GIT_ENOTFOUND : -1;
return (errno == ENOENT || errno == ENOTDIR) ? GIT_ENOTFOUND : -1;
}

return git_buf_sets(path_out, buf);
Expand Down

0 comments on commit 4681156

Please sign in to comment.