From: Stephen Gildea Date: Sat, 25 Sep 2021 04:59:17 +0000 (-0700) Subject: ; tramp-auto-save-directory: set mode atomically when creating X-Git-Tag: emacs-28.0.90~662 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=00556cf805347c6e9084a771ab74861b6b623943;p=emacs.git ; tramp-auto-save-directory: set mode atomically when creating * lisp/net/tramp.el (tramp-handle-make-auto-save-file-name): Use with-file-modes around make-directory. We can do this because Tramp now honors default file modes in make-directory. --- diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 2804b4d37d0..62628363b77 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5429,8 +5429,8 @@ this file, if that variable is non-nil." ;; Create directory. (unless (or (null tramp-auto-save-directory) (file-exists-p tramp-auto-save-directory)) - (make-directory tramp-auto-save-directory t) - (set-file-modes tramp-auto-save-directory #o0700)) + (with-file-modes #o0700 + (make-directory tramp-auto-save-directory t))) (let ((system-type (if (and (stringp tramp-auto-save-directory)