command/DatabaseCommands: pass URI to handle_lsinfo2()

This commit is contained in:
Max Kellermann 2015-10-20 12:07:18 +02:00
parent 81ce684b35
commit 76f85e6f7b
3 changed files with 3 additions and 6 deletions

View File

@ -52,11 +52,8 @@ handle_listfiles_db(Client &client, Response &r, const char *uri)
}
CommandResult
handle_lsinfo2(Client &client, Request args, Response &r)
handle_lsinfo2(Client &client, const char *uri, Response &r)
{
/* default is root directory */
const auto uri = args.GetOptional(0, "");
const DatabaseSelection selection(uri, false);
Error error;

View File

@ -30,7 +30,7 @@ CommandResult
handle_listfiles_db(Client &client, Response &r, const char *uri);
CommandResult
handle_lsinfo2(Client &client, Request request, Response &response);
handle_lsinfo2(Client &client, const char *uri, Response &response);
CommandResult
handle_find(Client &client, Request request, Response &response);

View File

@ -200,7 +200,7 @@ handle_lsinfo(Client &client, Request args, Response &r)
}
#ifdef ENABLE_DATABASE
CommandResult result = handle_lsinfo2(client, args, r);
CommandResult result = handle_lsinfo2(client, uri, r);
if (result != CommandResult::OK)
return result;
#endif