From 076582fde300472131422818d72e814e516c91ed Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 5 Nov 2014 12:23:10 +0100 Subject: [PATCH] * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name raises an error. Fixes: debbugs:18891 --- src/ChangeLog | 5 +++++ src/dired.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f30cad15f02..f7088fce563 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-11-05 Michael Albinus + + * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name + raises an error. (Bug#18891) + 2014-11-03 Eli Zaretskii * xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix. diff --git a/src/dired.c b/src/dired.c index c2db1f02782..fb536b8a91a 100644 --- a/src/dired.c +++ b/src/dired.c @@ -909,7 +909,10 @@ so last access time will always be midnight of that day. */) 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. */ -- 2.39.5