]> git.eshelyaron.com Git - emacs.git/commitdiff
; tramp-auto-save-directory: set mode atomically when creating
authorStephen Gildea <stepheng+emacs@gildea.com>
Sat, 25 Sep 2021 04:59:17 +0000 (21:59 -0700)
committerStephen Gildea <stepheng+emacs@gildea.com>
Sat, 25 Sep 2021 04:59:17 +0000 (21:59 -0700)
* 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

index 2804b4d37d0946985a3ba7ca8855083f002cc449..62628363b77163cccbf45fd83ae85dd9bbb0bfde 100644 (file)
@@ -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)