diff options
-rw-r--r-- | .emacs.d/init.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index c0fd0fa..acad923 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -6,9 +6,10 @@ (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) -(if (file-directory-p "~/.backup") - (setq backup-directory-alist '(("." . "~/.backup"))) - (message "Directory does not exist: ~/.backup")) +(let ((backup-dir "~/.backup")) + (unless (file-directory-p backup-dir) + (make-directory backup-dir t)) + (setq backup-directory-alist `(("." . ,backup-dir)))) (setq backup-by-copying t ; Don't delink hardlinks |