(let ((image-dired-dir (file-name-as-directory
(expand-file-name image-dired-dir))))
(unless (file-directory-p image-dired-dir)
- (make-directory image-dired-dir t)
+ (with-file-modes #o700
+ (make-directory image-dired-dir t))
(message "Creating thumbnails directory"))
image-dired-dir))
(let (dir buf)
(unless (file-directory-p (setq dir (file-name-directory
image-dired-db-file)))
- (make-directory dir t))
+ (with-file-modes #o700
+ (make-directory dir t)))
(with-current-buffer (setq buf (create-file-buffer
image-dired-db-file))
- (write-file image-dired-db-file))
+ (with-file-modes #o600
+ (write-file image-dired-db-file)))
(kill-buffer buf)
(file-exists-p image-dired-db-file))
(error "Could not create %s" image-dired-db-file)))
(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))
;; Open index file
(with-temp-file index-file