[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emms-patches] [COMMIT] * lisp/emms-source-file.el: Avoid adding duplica
From: |
Lucas Bonnet |
Subject: |
[Emms-patches] [COMMIT] * lisp/emms-source-file.el: Avoid adding duplicates when dealing with symbolic link. |
Date: |
Fri, 19 Feb 2010 16:38:24 +0100 |
Patch from Stefan Kangas <address@hidden>
---
lisp/emms-source-file.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/emms-source-file.el b/lisp/emms-source-file.el
index 1b0f039..91cd466 100644
--- a/lisp/emms-source-file.el
+++ b/lisp/emms-source-file.el
@@ -162,7 +162,7 @@ value of `emms-source-file-default-directory'."
(string-match emms-source-file-exclude-regexp file))
(emms-playlist-insert-track
(emms-track 'file file))))
- (emms-source-file-directory-tree dir regex)))
+ (emms-source-file-directory-tree (expand-file-name dir) regex)))
;;;###autoload (autoload 'emms-play-dired "emms-source-file" nil t)
;;;###autoload (autoload 'emms-add-dired "emms-source-file" nil t)
@@ -199,7 +199,10 @@ This function uses only emacs functions, so it might be a
bit slow."
(while dirs
(cond
((file-directory-p (car dirs))
- (if (string-match "/\\.\\.?$" (car dirs))
+ (if (or (string-match "/\\.\\.?$" (car dirs))
+ (let ((symlink (file-symlink-p (car dirs))))
+ (and symlink
+ (string-equal dir (substring symlink 0 (string-width
dir))))))
(setq dirs (cdr dirs))
(setq dirs
(condition-case nil
--
debian.1.5.6.1.19.ge6b2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emms-patches] [COMMIT] * lisp/emms-source-file.el: Avoid adding duplicates when dealing with symbolic link.,
Lucas Bonnet <=