Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-05-07 15:56:42 +0400
committernulltoken <emeric.fermas@gmail.com>2012-05-08 12:05:16 +0400
commit46811561ae19701d4d0fc4b00113667f81961dfc (patch)
tree74738de01458eecb9073577dcad406c42482f74a /src/path.c
parentcb0ce16bbe8efe2098ef9cfffcf158301b036565 (diff)
path: Make git_path_prettify() properly handle ENOTDIR errno value
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path.c b/src/path.c
index 703f43af1..ccf80edb4 100644
--- a/src/path.c
+++ b/src/path.c
@@ -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);