Mercurial > emacs
changeset 37961:d95290112d89
(Fdo_auto_save): Don't try to create the directory of
auto-save-list-file-name when shutting down Emacs, because
creating the directory might signal an error, and leaves
Emacs in a strange state.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 31 May 2001 09:58:33 +0000 |
parents | 7103eb9ef882 |
children | 945d7ba322e3 |
files | src/fileio.c |
diffstat | 1 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Thu May 31 08:56:58 2001 +0000 +++ b/src/fileio.c Thu May 31 09:58:33 2001 +0000 @@ -5370,13 +5370,20 @@ if (STRINGP (Vauto_save_list_file_name)) { - Lisp_Object listfile, dir; + Lisp_Object listfile; listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil); - - dir = Ffile_name_directory (listfile); - if (NILP (Ffile_directory_p (dir))) - call2 (Qmake_directory, dir, Qt); + + /* Don't try to create the directory when shutting down Emacs, + because creating the directory might signal an error, and + that would leave Emacs in a strange state. */ + if (!NILP (Vrun_hooks)) + { + Lisp_Object dir; + dir = Ffile_name_directory (listfile); + if (NILP (Ffile_directory_p (dir))) + call2 (Qmake_directory, dir, Qt); + } stream = fopen (XSTRING (listfile)->data, "w"); if (stream != NULL)