diff --git a/read-cache.c b/read-cache.c index 5be7cd1dbf50c8..be4e510c248572 100644 --- a/read-cache.c +++ b/read-cache.c @@ -821,9 +821,10 @@ int verify_path(const char *path) return 0; c = *path++; if ((c == '.' && !verify_dotfile(path)) || - is_dir_sep(c) || c == '\0') + is_dir_sep(c) || c == ':' || c == '\0') return 0; - } + } else if (c == ':') + return 0; c = *path++; } }