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: Arnaud Fontaine <[email protected]>
---
 lisp/emms-cache.el |    2 ++
 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")
-- 
1.7.4.4


_______________________________________________
Emms-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emms-patches

Reply via email to