summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--update-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/update-cache.c b/update-cache.c
index 16e1bb9..5dda89a 100644
--- a/update-cache.c
+++ b/update-cache.c
@@ -111,7 +111,7 @@ static int add_file_to_cache(char *path)
fd = open(path, O_RDONLY);
if (fd < 0) {
- if (errno == ENOENT) {
+ if (errno == ENOENT || errno == ENOTDIR) {
if (allow_remove)
return remove_file_from_cache(path);
}