From 28f9a0a900fe0163eb19f14f3d71e8a828fbcf29 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 13 Nov 2015 21:04:02 +0100 Subject: command/other: re-allow "lsinfo /" This compatibility hack was accidently broken by commit f072cbbb --- src/command/OtherCommands.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/command/OtherCommands.cxx b/src/command/OtherCommands.cxx index b4a23fe4b..a95dace91 100644 --- a/src/command/OtherCommands.cxx +++ b/src/command/OtherCommands.cxx @@ -228,7 +228,14 @@ CommandResult handle_lsinfo(Client &client, Request args, Response &r) { /* default is root directory */ - const auto uri = args.GetOptional(0, ""); + auto uri = args.GetOptional(0, ""); + if (StringIsEqual(uri, "/")) + /* this URI is malformed, but some clients are buggy + and use "lsinfo /" to list files in the music root + directory, which was never intended to work, but + once did; in order to retain backwards + compatibility, work around this here */ + uri = ""; Error error; const auto located_uri = LocateUri(uri, &client, -- cgit v1.2.3