Fix lsinfo and add for mounted databases.

If `SimpleDatabase::Visit` is called on a database that contains a mounted directry the URIs of the elements passed to the callbacks are not prefixed by the mountpoint path. This leads to lsinfo and add not working because they use the wrong URI. This pull request is using the `WalkMount` helper function to create prefixed versions of `VisitDirectory`, `VisitSong` and `VisitPlaylist` to add the correct prefix to the parameters of the callback functions.
This commit is contained in:
FlashSystems
2017-12-02 19:39:17 +01:00
committed by Max Kellermann
parent 967af60327
commit c488d3123f
5 changed files with 18 additions and 4 deletions

View File

@@ -230,7 +230,7 @@ Directory::Walk(bool recursive, const SongFilter *filter,
call will lock it again */
const ScopeDatabaseUnlock unlock;
WalkMount(GetPath(), *mounted_database,
recursive, filter,
"", recursive, filter,
visit_directory, visit_song,
visit_playlist);
return;