diff options
author | Anthony DeRossi <ajderossi@gmail.com> | 2015-09-29 10:39:07 -0700 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-09-30 21:50:34 +0200 |
commit | 6b6c7b0920358eb9cceecf52dac919a95f59da7f (patch) | |
tree | 4bd84946b4f7c66bcc0bae785da3af70c7cee251 /src/db/update/ExcludeList.hxx | |
parent | de332a16d17a3e23438ba4dd05f27ad6bdd4a04d (diff) | |
download | mpd-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 '')
-rw-r--r-- | src/db/update/ExcludeList.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/db/update/ExcludeList.hxx b/src/db/update/ExcludeList.hxx index de48bac99..4952d291a 100644 --- a/src/db/update/ExcludeList.hxx +++ b/src/db/update/ExcludeList.hxx @@ -36,15 +36,23 @@ class Path; class ExcludeList { + const ExcludeList *const parent; + #ifdef HAVE_CLASS_GLOB std::forward_list<Glob> patterns; #endif public: + ExcludeList() + :parent(nullptr) {} + + ExcludeList(const ExcludeList &_parent) + :parent(&_parent) {} + gcc_pure bool IsEmpty() const { #ifdef HAVE_CLASS_GLOB - return patterns.empty(); + return ((parent == nullptr) || parent->IsEmpty()) && patterns.empty(); #else /* not implemented */ return true; |