aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-18 21:47:20 +0100
committerMax Kellermann <max@duempel.org>2014-11-18 21:47:20 +0100
commit26382713c26139e474bda5e74798e1201e036b82 (patch)
treeda03a95d2cf840843e1e02052d2d87d8e513ee0f /src/command
parentf37481f843c3ae7aa0c43591c9c7fc4a501c1f5b (diff)
parentd6bc5c35a730a9542af79118369022115009eddd (diff)
downloadmpd-26382713c26139e474bda5e74798e1201e036b82.tar.gz
mpd-26382713c26139e474bda5e74798e1201e036b82.tar.xz
mpd-26382713c26139e474bda5e74798e1201e036b82.zip
Merge tag 'v0.19.4'
Diffstat (limited to 'src/command')
-rw-r--r--src/command/QueueCommands.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/command/QueueCommands.cxx b/src/command/QueueCommands.cxx
index 36c8ac84f..d0b789eb1 100644
--- a/src/command/QueueCommands.cxx
+++ b/src/command/QueueCommands.cxx
@@ -61,7 +61,16 @@ translate_uri(Client &client, const char *uri)
CommandResult
handle_add(Client &client, gcc_unused unsigned argc, char *argv[])
{
- const char *const uri = translate_uri(client, argv[1]);
+ const char *uri = argv[1];
+ if (memcmp(uri, "/", 2) == 0)
+ /* this URI is malformed, but some clients are buggy
+ and use "add /" to add the whole database, which
+ was never intended to work, but once did; in order
+ to retain backwards compatibility, work around this
+ here */
+ uri = "";
+
+ uri = translate_uri(client, uri);
if (uri == nullptr)
return CommandResult::ERROR;