changeset 57303:b2a68db48f92

* fileio.c (auto_save_1) Call Ffile_modes for remote files.
author Michael Albinus <michael.albinus@gmx.de>
date Sun, 03 Oct 2004 17:40:07 +0000
parents edc06267fdaa
children 8d5af2441eda
files src/ChangeLog src/fileio.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Oct 03 15:36:18 2004 +0000
+++ b/src/ChangeLog	Sun Oct 03 17:40:07 2004 +0000
@@ -1,3 +1,7 @@
+2004-10-03  Michael Albinus  <michael.albinus@gmx.de>
+
+	* fileio.c (auto_save_1) Call Ffile_modes for remote files.
+
 2004-09-30  Kenichi Handa  <handa@m17n.org>
 
 	* process.c (send_process): Free composition data.
--- a/src/fileio.c	Sun Oct 03 15:36:18 2004 +0000
+++ b/src/fileio.c	Sun Oct 03 17:40:07 2004 +0000
@@ -5718,6 +5718,9 @@
       && stat (SDATA (current_buffer->filename), &st) >= 0)
     /* But make sure we can overwrite it later!  */
     auto_save_mode_bits = st.st_mode | 0600;
+  else if (! NILP (current_buffer->filename))
+    /* Remote files don't cooperate with stat.  */
+    auto_save_mode_bits = XINT (Ffile_modes (current_buffer->filename)) | 0600;
   else
     auto_save_mode_bits = 0666;