* src/dired.c (directory_files_internal): Fix race condition:
when some other process removed a file between the readdir and
the ensuing lstat, directory-files-and-attributes would return
a list containing nil.
{
Lisp_Object fileattrs
= file_attributes (fd, dp->d_name, directory, name, id_format);
- list = Fcons (Fcons (finalname, fileattrs), list);
+ if (!NILP (fileattrs))
+ list = Fcons (Fcons (finalname, fileattrs), list);
}
else
list = Fcons (finalname, list);