changeset 60732:d9f04f9f10ad

(backup-buffer): If the file's directory is not writable, use copy instead of move to backup the file.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 19 Mar 2005 13:29:06 +0000
parents 1b86851c0ef0
children 60e10b23dae1
files lisp/files.el
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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