summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c
index 95a65893c..5849b79b2 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -94,7 +94,7 @@ int git_futils_open_ro(const char *path)
{
int fd = p_open(path, O_RDONLY);
if (fd < 0) {
- if (errno == ENOENT)
+ if (errno == ENOENT || errno == ENOTDIR)
fd = GIT_ENOTFOUND;
giterr_set(GITERR_OS, "Failed to open '%s'", path);
}