emms-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emms-patches] [PATCH 2/2] Create cache directory if it does not already


From: Arnaud Fontaine
Subject: [Emms-patches] [PATCH 2/2] Create cache directory if it does not already exist.
Date: Tue, 19 Apr 2011 06:14:10 +0200

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]