From 00556cf805347c6e9084a771ab74861b6b623943 Mon Sep 17 00:00:00 2001 From: Stephen Gildea Date: Fri, 24 Sep 2021 21:59:17 -0700 Subject: [PATCH] ; 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. --- lisp/net/tramp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.39.2