diff options
| author | Paul Eggert | 2019-09-16 17:43:56 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-09-16 18:00:59 -0700 |
| commit | bc1c2cf009e30af77523fd87a8910fdbc4284704 (patch) | |
| tree | e825b2ac67c0beb3b43f50ec100eed4c0d93570b /lisp/gnus | |
| parent | b124cb8f30d575fcda97507c40f16a499640bcd5 (diff) | |
| download | emacs-bc1c2cf009e30af77523fd87a8910fdbc4284704.tar.gz emacs-bc1c2cf009e30af77523fd87a8910fdbc4284704.zip | |
Fix some file-mode races
* lisp/emacs-lisp/autoload.el (autoload-ensure-file-writeable):
* lisp/files.el (after-find-file):
* lisp/gnus/gnus-start.el (gnus-dribble-read-file):
* lisp/htmlfontify.el (hfy-copy-and-fontify-file):
* lisp/server.el (server-ensure-safe-dir):
Avoid a race when getting file permissions.
Diffstat (limited to 'lisp/gnus')
| -rw-r--r-- | lisp/gnus/gnus-start.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index e8775c66673..cb369f07b92 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -897,9 +897,8 @@ If REGEXP is given, lines that match it will be deleted." | |||
| 897 | (set-buffer-modified-p t)) | 897 | (set-buffer-modified-p t)) |
| 898 | ;; Set the file modes to reflect the .newsrc file modes. | 898 | ;; Set the file modes to reflect the .newsrc file modes. |
| 899 | (save-buffer) | 899 | (save-buffer) |
| 900 | (when (and (file-exists-p gnus-current-startup-file) | 900 | (when (and (setq modes (file-modes gnus-current-startup-file)) |
| 901 | (file-exists-p dribble-file) | 901 | (file-exists-p dribble-file)) |
| 902 | (setq modes (file-modes gnus-current-startup-file))) | ||
| 903 | (gnus-set-file-modes dribble-file modes)) | 902 | (gnus-set-file-modes dribble-file modes)) |
| 904 | (goto-char (point-min)) | 903 | (goto-char (point-min)) |
| 905 | (when (search-forward "Gnus was exited on purpose" nil t) | 904 | (when (search-forward "Gnus was exited on purpose" nil t) |