From 308290aa272fff106c81d1f4ae51b76190d8fe12 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 19 Nov 2006 04:19:00 +0000 Subject: Don't add subdirectories for directory and playlist-directory source insert methods darcs-hash:20061119041900-1bfb2-8adccc41afb392449ac47e4c216d26d640d6b4d5.gz --- emms-source-file.el | 5 +++-- emms-source-playlist.el | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/emms-source-file.el b/emms-source-file.el index 7a395bd..e3c8a59 100644 --- a/emms-source-file.el +++ b/emms-source-file.el @@ -118,8 +118,9 @@ from the user." emms-source-file-default-directory t))) (mapc (lambda (file) - (unless (let ((case-fold-search nil)) - (string-match emms-source-file-exclude-regexp file)) + (unless (or (let ((case-fold-search nil)) + (string-match emms-source-file-exclude-regexp file)) + (file-directory-p file)) (emms-playlist-insert-track (emms-track 'file (expand-file-name file))))) (directory-files dir t (emms-source-file-regex)))) diff --git a/emms-source-playlist.el b/emms-source-playlist.el index e299e07..a123cf7 100644 --- a/emms-source-playlist.el +++ b/emms-source-playlist.el @@ -450,8 +450,9 @@ If DIR is not specified, it is queried from the user." emms-source-file-default-directory t))) (mapc (lambda (file) - (unless (let ((case-fold-search nil)) - (string-match emms-source-file-exclude-regexp file)) + (unless (or (let ((case-fold-search nil)) + (string-match emms-source-file-exclude-regexp file)) + (file-directory-p file)) (emms-playlist-insert-track (emms-track 'playlist (expand-file-name file))))) (directory-files dir t "^[^.]"))) -- cgit v1.2.3