diff --git a/builtin/clean.c b/builtin/clean.c index 4c9680acb..5adb52d82 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -961,8 +961,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix) die_errno("Cannot lstat '%s'", ent->name); if (pathspec.nr) - matches = match_pathspec(&pathspec, ent->name, - len, 0, NULL, 0); + matches = dir_path_match(ent, &pathspec, 0, NULL); if (S_ISDIR(st.st_mode)) { if (remove_directories || (matches == MATCHED_EXACTLY)) {