diff --git a/compat/mingw.c b/compat/mingw.c index 55891ff83e23cc..617ceb7e646089 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -591,6 +591,8 @@ static inline int needs_hiding(const char *path) /* ignore trailing slashes */ if (*path) basename = path; + else + break; } if (hide_dotfiles == HIDE_DOTFILES_TRUE)