Lisp_Object w32_save = Qnil;
#endif
+ /* Don't let the compiler optimize away all copies of DIRECTORY,
+ which would break GC; see Bug#16986. Although this is required
+ only in the common case where GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS,
+ it shouldn't break anything in the other cases. */
+ Lisp_Object volatile directory_volatile = directory;
+
/* Because of file name handlers, these functions might call
Ffuncall, and cause a GC. */
list = encoded_directory = dirfilename = Qnil;
list = Fsort (Fnreverse (list),
attrs ? Qfile_attributes_lessp : Qstring_lessp);
+ (void) directory_volatile;
RETURN_UNGCPRO (list);
}
Lisp_Object encoded;
Lisp_Object handler;
- filename = Fexpand_file_name (filename, Qnil);
+ filename = internal_condition_case_2 (Fexpand_file_name, filename, Qnil,
+ Qt, Fidentity);
+ if (!STRINGP (filename))
+ return Qnil;
/* If the file name has special constructs in it,
call the corresponding file handler. */