DatabaseSelection: use std::string
This commit is contained in:
@@ -398,7 +398,7 @@ ProxyDatabase::Visit(const DatabaseSelection &selection,
|
||||
// TODO: match
|
||||
// TODO: auto-reconnect
|
||||
|
||||
return ::Visit(connection, selection.uri, selection.recursive,
|
||||
return ::Visit(connection, selection.uri.c_str(), selection.recursive,
|
||||
visit_directory, visit_song, visit_playlist,
|
||||
error);
|
||||
}
|
||||
|
||||
@@ -239,10 +239,10 @@ SimpleDatabase::Visit(const DatabaseSelection &selection,
|
||||
{
|
||||
ScopeDatabaseLock protect;
|
||||
|
||||
const Directory *directory = root->LookupDirectory(selection.uri);
|
||||
const Directory *directory = root->LookupDirectory(selection.uri.c_str());
|
||||
if (directory == nullptr) {
|
||||
if (visit_song) {
|
||||
Song *song = root->LookupSong(selection.uri);
|
||||
Song *song = root->LookupSong(selection.uri.c_str());
|
||||
if (song != nullptr)
|
||||
return !selection.Match(*song) ||
|
||||
visit_song(*song, error);
|
||||
|
||||
Reference in New Issue
Block a user