Commit 79d2d279 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(backup-buffer): If the file's directory is not writable,

use copy instead of move to backup the file.
parent f3b7338c
2005-03-19 JUAN-LEON Lahoz Garcia <juanleon1@gmail.com>
* files.el (backup-buffer): If the file's directory is not
writable, use copy instead of move to backup the file.
2005-03-19 Eli Zaretskii <eliz@gnu.org>
 
* obsolete/keyswap.el: Moved to obsolete/ from term/.
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment