From 1d18bc3a67cfe076a2b32149f017e7860b12bc70 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 2 May 2000 20:09:21 +0000 Subject: [PATCH] (recover-session): Make directories as necessary if they don't exist yet. --- lisp/files.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/files.el b/lisp/files.el index 039f7fc5a22..f9fbc763097 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3011,6 +3011,9 @@ Then you'll be asked about a number of files to recover." (interactive) (if (null auto-save-list-file-prefix) (error "You set `auto-save-list-file-prefix' to disable making session files")) + (let ((dir (file-name-directory auto-save-list-file-prefix))) + (unless (file-directory-p dir) + (make-directory dir t))) (let ((ls-lisp-support-shell-wildcards t)) (dired (concat auto-save-list-file-prefix "*") (concat dired-listing-switches "t"))) -- 2.39.5