diff options
author | Max Kellermann <max@duempel.org> | 2011-09-13 20:38:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-13 20:44:35 +0200 |
commit | 412cf974a4cf3693cc643ab8ce0c1d733b7e8047 (patch) | |
tree | 05ad662892dd364b6c3466dfc860270cb4c8d944 /src/database.c | |
parent | 3fc6beeff0c5bba90a458422c40af5ed0d6c81aa (diff) | |
download | mpd-412cf974a4cf3693cc643ab8ce0c1d733b7e8047.tar.gz mpd-412cf974a4cf3693cc643ab8ce0c1d733b7e8047.tar.xz mpd-412cf974a4cf3693cc643ab8ce0c1d733b7e8047.zip |
directory: don't visit "self" in _walk()
Let the caller decide if the current directory should be visited.
Diffstat (limited to '')
-rw-r--r-- | src/database.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c index 6d7cc3e23..d93066389 100644 --- a/src/database.c +++ b/src/database.c @@ -128,6 +128,10 @@ db_walk(const char *uri, return false; } + if (visitor->directory != NULL && + !visitor->directory(directory, ctx, error_r)) + return false; + return directory_walk(directory, visitor, ctx, error_r); } |