# HG changeset patch # User Eli Zaretskii # Date 1111238946 0 # Node ID d9f04f9f10ad26de77f89c7f0e260d19f3fec359 # Parent 1b86851c0ef0be0096d0f69e1cf3fcc7d6a54a44 (backup-buffer): If the file's directory is not writable, use copy instead of move to backup the file. diff -r 1b86851c0ef0 -r d9f04f9f10ad lisp/files.el --- a/lisp/files.el Sat Mar 19 13:15:38 2005 +0000 +++ b/lisp/files.el Sat Mar 19 13:29:06 2005 +0000 @@ -2687,6 +2687,7 @@ backup-by-copying ;; Don't rename a suid or sgid file. (and modes (< 0 (logand modes #o6000))) + (not (file-writable-p (file-name-directory real-file-name))) (and backup-by-copying-when-linked (> (file-nlinks real-file-name) 1)) (and (or backup-by-copying-when-mismatch