aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update/ExcludeList.cxx
diff options
context:
space:
mode:
authorAnthony DeRossi <ajderossi@gmail.com>2015-09-29 10:39:07 -0700
committerMax Kellermann <max@duempel.org>2015-09-30 21:50:34 +0200
commit6b6c7b0920358eb9cceecf52dac919a95f59da7f (patch)
tree4bd84946b4f7c66bcc0bae785da3af70c7cee251 /src/db/update/ExcludeList.cxx
parentde332a16d17a3e23438ba4dd05f27ad6bdd4a04d (diff)
downloadmpd-6b6c7b0920358eb9cceecf52dac919a95f59da7f.tar.gz
mpd-6b6c7b0920358eb9cceecf52dac919a95f59da7f.tar.xz
mpd-6b6c7b0920358eb9cceecf52dac919a95f59da7f.zip
update: apply .mpdignore matches to subdirectories
Wildcard matches are directly applied to all filenames in subdirectories without any attempt at matching relative paths. This change is based on the following feature request: http://bugs.musicpd.org/view.php?id=3729
Diffstat (limited to 'src/db/update/ExcludeList.cxx')
-rw-r--r--src/db/update/ExcludeList.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/db/update/ExcludeList.cxx b/src/db/update/ExcludeList.cxx
index 3b54d635e..b09f349ac 100644
--- a/src/db/update/ExcludeList.cxx
+++ b/src/db/update/ExcludeList.cxx
@@ -89,6 +89,12 @@ ExcludeList::Check(Path name_fs) const
/* XXX include full path name in check */
#ifdef HAVE_CLASS_GLOB
+ if (parent != nullptr) {
+ if (parent->Check(name_fs)) {
+ return true;
+ }
+ }
+
for (const auto &i : patterns)
if (i.Check(NarrowPath(name_fs).c_str()))
return true;