diff options
| author | Mark Oteiza | 2015-11-18 13:42:40 -0500 |
|---|---|---|
| committer | Mark Oteiza | 2015-11-21 11:08:02 -0500 |
| commit | e6b1818f87f559fdd854bdace2801637caffe6ae (patch) | |
| tree | c2d432c1a12a5a93de7979ac05e571f05465172e | |
| parent | 3c407d2919f972a6b03bdb3f30d14cdfa7de06fe (diff) | |
| download | emacs-e6b1818f87f559fdd854bdace2801637caffe6ae.tar.gz emacs-e6b1818f87f559fdd854bdace2801637caffe6ae.zip | |
Backport: Fix issue where a new tempfile was created every refresh
* lisp/mpc.el (mpc-format): Leave dir as relative path
| -rw-r--r-- | lisp/mpc.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/mpc.el b/lisp/mpc.el index af1aac93f14..c40c09cc2ef 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -1026,12 +1026,11 @@ If PLAYLIST is t or nil or missing, use the main playlist." | |||
| 1026 | (substring time (match-end 0)) | 1026 | (substring time (match-end 0)) |
| 1027 | time))))) | 1027 | time))))) |
| 1028 | (`Cover | 1028 | (`Cover |
| 1029 | (let ((dir (file-name-directory | 1029 | (let ((dir (file-name-directory (cdr (assq 'file info))))) |
| 1030 | (mpc-file-local-copy (cdr (assq 'file info)))))) | ||
| 1031 | ;; (debug) | 1030 | ;; (debug) |
| 1032 | (push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred) | 1031 | (push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred) |
| 1033 | (if-let ((covers '(".folder.png" "cover.jpg" "folder.jpg")) | 1032 | (if-let ((covers '(".folder.png" "cover.jpg" "folder.jpg")) |
| 1034 | (cover (cl-loop for file in (directory-files dir) | 1033 | (cover (cl-loop for file in (directory-files (mpc-file-local-copy dir)) |
| 1035 | if (member (downcase file) covers) | 1034 | if (member (downcase file) covers) |
| 1036 | return (concat dir file))) | 1035 | return (concat dir file))) |
| 1037 | (file (with-demoted-errors "MPC: %s" | 1036 | (file (with-demoted-errors "MPC: %s" |