]> git.eshelyaron.com Git - emacs.git/commitdiff
image-dired: Fix gallery directory permissions
authorStefan Kangas <stefankangas@gmail.com>
Fri, 4 Aug 2023 13:24:46 +0000 (15:24 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sat, 5 Aug 2023 15:57:52 +0000 (17:57 +0200)
* lisp/image/image-dired.el (image-dired-gallery-generate): Set
umask to 077 before creating gallery directory.

lisp/image/image-dired.el

index 33beb5b3e49b6ce2adb58e6bbdd1a24bd4742f32..9a92cae8ad538d88e89bc25205324b9ae4d3706a 100644 (file)
@@ -1905,8 +1905,8 @@ when using per-directory thumbnail file storage"))
     (if (file-exists-p image-dired-gallery-dir)
         (if (not (file-directory-p image-dired-gallery-dir))
             (error "Variable image-dired-gallery-dir is not a directory"))
-      ;; FIXME: Should we set umask to 077 here, as we do for thumbnails?
-      (make-directory image-dired-gallery-dir))
+      (with-file-modes #o700
+        (make-directory image-dired-gallery-dir)))
     ;; Open index file
     (with-temp-file index-file
       (if (file-exists-p index-file)