diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/files.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/files.el b/lisp/files.el index a384e7136e8..96f1e8d47e7 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -134,10 +134,11 @@ This variable is relevant only if `backup-by-copying' is nil." | |||
| 134 | (defcustom backup-by-copying-when-privileged-mismatch 200 | 134 | (defcustom backup-by-copying-when-privileged-mismatch 200 |
| 135 | "Non-nil means create backups by copying to preserve a privileged owner. | 135 | "Non-nil means create backups by copying to preserve a privileged owner. |
| 136 | Renaming may still be used (subject to control of other variables) | 136 | Renaming may still be used (subject to control of other variables) |
| 137 | when it would not result in changing the owner of the file or if the owner | 137 | when it would not result in changing the owner of the file or if the |
| 138 | has a user id greater than the value of this variable. This is useful | 138 | user id and group id of the file are both greater than the value of |
| 139 | when low-numbered uid's are used for special system users (such as root) | 139 | this variable. This is useful when low-numbered uid's and gid's are |
| 140 | that must maintain ownership of certain files. | 140 | used for special system users (such as root) that must maintain |
| 141 | ownership of certain files. | ||
| 141 | This variable is relevant only if `backup-by-copying' and | 142 | This variable is relevant only if `backup-by-copying' and |
| 142 | `backup-by-copying-when-mismatch' are nil." | 143 | `backup-by-copying-when-mismatch' are nil." |
| 143 | :type '(choice (const nil) integer) | 144 | :type '(choice (const nil) integer) |
| @@ -4634,8 +4635,10 @@ BACKUPNAME is the backup file name, which is the old file renamed." | |||
| 4634 | (let ((attr (file-attributes | 4635 | (let ((attr (file-attributes |
| 4635 | real-file-name | 4636 | real-file-name |
| 4636 | 'integer))) | 4637 | 'integer))) |
| 4637 | (<= (file-attribute-user-id attr) | 4638 | (or (<= (file-attribute-user-id attr) |
| 4638 | copy-when-priv-mismatch)))) | 4639 | copy-when-priv-mismatch) |
| 4640 | (<= (file-attribute-group-id attr) | ||
| 4641 | copy-when-priv-mismatch))))) | ||
| 4639 | (not (file-ownership-preserved-p real-file-name | 4642 | (not (file-ownership-preserved-p real-file-name |
| 4640 | t))))) | 4643 | t))))) |
| 4641 | setmodes) | 4644 | setmodes) |