summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index ebd4d469f5c..68a1d52a2df 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2687,6 +2687,7 @@ BACKUPNAME is the backup file name, which is the old file renamed."
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