diff options
author | Max Kellermann <max@duempel.org> | 2015-11-13 21:04:02 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-11-13 21:04:02 +0100 |
commit | 28f9a0a900fe0163eb19f14f3d71e8a828fbcf29 (patch) | |
tree | 05f676ec942e0abe87c86b3863821c911a77122e | |
parent | a6bb3cf60a219222bd04164213fb91e013ca78fa (diff) | |
download | mpd-28f9a0a900fe0163eb19f14f3d71e8a828fbcf29.tar.gz mpd-28f9a0a900fe0163eb19f14f3d71e8a828fbcf29.tar.xz mpd-28f9a0a900fe0163eb19f14f3d71e8a828fbcf29.zip |
command/other: re-allow "lsinfo /"
This compatibility hack was accidently broken by commit f072cbbb
Diffstat (limited to '')
-rw-r--r-- | src/command/OtherCommands.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
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, |