diff options
-rw-r--r-- | read-cache.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/read-cache.c b/read-cache.c index 31cf0b503..3593291f7 100644 --- a/read-cache.c +++ b/read-cache.c @@ -784,16 +784,9 @@ int verify_path(const char *path) if (is_dir_sep(c)) { inside: c = *path++; - switch (c) { - default: - continue; - case '/': case '\0': - break; - case '.': - if (verify_dotfile(path)) - continue; - } - return 0; + if ((c == '.' && !verify_dotfile(path)) || + is_dir_sep(c) || c == '\0') + return 0; } c = *path++; } |