mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-23 03:45:32 +00:00
path: Make git_path_prettify() properly handle ENOTDIR errno value
This commit is contained in:
parent
cb0ce16bbe
commit
46811561ae
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user