aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Fontaine <arnau@debian.org>2011-04-19 06:14:10 +0200
committerLucas Bonnet <lucas@rincevent.net>2011-04-19 08:43:19 +0200
commit716975560a3385c4955ef1481f4994567dc66830 (patch)
treec39e3eb648839e8c0d20f67bb502145ea0cffee3
parente87bcd69dfcdc63888933cc04bab2081e10494b7 (diff)
Create cache directory if it does not already exist.
Following the quickstart guide, then adding a directory tree after creating a playlist, an error message is displayed upon leaving Emacs as the cache directory does not exist. Signed-off-by: Lucas Bonnet <lucas@rincevent.net>
-rw-r--r--lisp/emms-cache.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emms-cache.el b/lisp/emms-cache.el
index 4741cbf..4f96898 100644
--- a/lisp/emms-cache.el
+++ b/lisp/emms-cache.el
@@ -140,6 +140,8 @@ This is used to cache over emacs sessions.")
emms-cache-db)
(when (fboundp 'set-buffer-file-coding-system)
(set-buffer-file-coding-system emms-cache-file-coding-system))
+ (unless (file-directory-p (file-name-directory emms-cache-file))
+ (make-directory (file-name-directory emms-cache-file)))
(write-region (point-min) (point-max) emms-cache-file)
(kill-buffer (current-buffer))
(message "Saving emms track cache...done")