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
This commit is contained in:

committed by
Max Kellermann

parent
de332a16d1
commit
6b6c7b0920
@@ -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;
|
||||
|
Reference in New Issue
Block a user