diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-02-19 13:47:57 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-02-19 13:48:27 -0800 |
commit | 734eb7e457da8a9b2c91798d591c03285c6967ce (patch) | |
tree | c8d8dc92d4af164c895d73de29e3d548385cff3c /lisp/image-dired.el | |
parent | 4b118bdca1d8aa130fb67eadb16e08e87e698aa4 (diff) | |
download | emacs-734eb7e457da8a9b2c91798d591c03285c6967ce.tar.gz emacs-734eb7e457da8a9b2c91798d591c03285c6967ce.tar.bz2 emacs-734eb7e457da8a9b2c91798d591c03285c6967ce.zip |
Fix some file-modes races
* lisp/gnus/gnus-start.el (gnus-save-newsrc-file)
(gnus-slave-save-newsrc):
* lisp/gnus/gnus-uu.el (gnus-uu-initialize):
* lisp/gnus/mm-archive.el (mm-dissect-archive):
* lisp/gnus/mm-decode.el (mm-temp-files-delete)
(mm-display-external):
* lisp/image-dired.el (image-dired-create-thumb-1):
Use with-file-modes rather than setting the file modes later.
This fixes some race conditions where the file temporarily
has the wrong permissions.
Diffstat (limited to 'lisp/image-dired.el')
-rw-r--r-- | lisp/image-dired.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 768e941490d..1cc38ba714b 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -771,8 +771,8 @@ Increase at own risk.") process) (when (not (file-exists-p thumbnail-dir)) (message "Creating thumbnail directory") - (make-directory thumbnail-dir t) - (set-file-modes thumbnail-dir #o700)) + (with-file-modes #o700 + (make-directory thumbnail-dir t))) ;; Thumbnail file creation processes begin here and are marshaled ;; in a queue by `image-dired-create-thumb'. |