aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 6026d8ebad4..ea6e4aef9be 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -203,7 +203,8 @@ report_file_errno (char const *string, Lisp_Object name, int errorno)
203 if (errorno == EEXIST) 203 if (errorno == EEXIST)
204 xsignal (Qfile_already_exists, errdata); 204 xsignal (Qfile_already_exists, errdata);
205 else 205 else
206 xsignal (Qfile_error, Fcons (build_string (string), errdata)); 206 xsignal (errorno == ENOENT ? Qfile_missing : Qfile_error,
207 Fcons (build_string (string), errdata));
207} 208}
208 209
209/* Signal a file-access failure that set errno. STRING describes the 210/* Signal a file-access failure that set errno. STRING describes the
@@ -5874,6 +5875,7 @@ syms_of_fileio (void)
5874 DEFSYM (Qfile_error, "file-error"); 5875 DEFSYM (Qfile_error, "file-error");
5875 DEFSYM (Qfile_already_exists, "file-already-exists"); 5876 DEFSYM (Qfile_already_exists, "file-already-exists");
5876 DEFSYM (Qfile_date_error, "file-date-error"); 5877 DEFSYM (Qfile_date_error, "file-date-error");
5878 DEFSYM (Qfile_missing, "file-missing");
5877 DEFSYM (Qfile_notify_error, "file-notify-error"); 5879 DEFSYM (Qfile_notify_error, "file-notify-error");
5878 DEFSYM (Qexcl, "excl"); 5880 DEFSYM (Qexcl, "excl");
5879 5881
@@ -5926,6 +5928,11 @@ behaves as if file names were encoded in `utf-8'. */);
5926 Fput (Qfile_date_error, Qerror_message, 5928 Fput (Qfile_date_error, Qerror_message,
5927 build_pure_c_string ("Cannot set file date")); 5929 build_pure_c_string ("Cannot set file date"));
5928 5930
5931 Fput (Qfile_missing, Qerror_conditions,
5932 Fpurecopy (list3 (Qfile_missing, Qfile_error, Qerror)));
5933 Fput (Qfile_missing, Qerror_message,
5934 build_pure_c_string ("File is missing"));
5935
5929 Fput (Qfile_notify_error, Qerror_conditions, 5936 Fput (Qfile_notify_error, Qerror_conditions,
5930 Fpurecopy (list3 (Qfile_notify_error, Qfile_error, Qerror))); 5937 Fpurecopy (list3 (Qfile_notify_error, Qfile_error, Qerror)));
5931 Fput (Qfile_notify_error, Qerror_message, 5938 Fput (Qfile_notify_error, Qerror_message,