command: special case for "add /"

The undocumented command "add /" adds the full music database to the
playlist.  Don't interpret this special path as a local file path.
This commit is contained in:
Max Kellermann 2008-10-16 07:40:34 +02:00
parent f9222fdabe
commit beec15ddaa

View File

@ -448,7 +448,7 @@ static int handleAdd(struct client *client,
char *path = argv[1]; char *path = argv[1];
enum playlist_result result; enum playlist_result result;
if (path[0] == '/') { if (path[0] == '/' && path[1] != 0) {
result = playlist_append_file(path, client_get_uid(client), result = playlist_append_file(path, client_get_uid(client),
NULL); NULL);
return print_playlist_result(client, result); return print_playlist_result(client, result);