diff --git a/src/dired.c b/src/dired.c index b81e35384ea..3f5c93b5732 100644 --- a/src/dired.c +++ b/src/dired.c @@ -236,6 +236,9 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, #endif ; + if (!NILP (match)) + CHECK_STRING (match); + /* Loop reading directory entries. */ for (struct dirent *dp; (dp = read_dirent (d, directory)); ) {