aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-03 12:29:42 +0100
committerMax Kellermann <max@duempel.org>2009-01-03 12:29:42 +0100
commit2cf96abcc15873ec5770b5933a3a7b3d28af8bdc (patch)
tree99d60a2cf55e10b8516f450f2080f0693ccf576e /src/command.c
parent7a8ef820a4c76c83ad1d0e8eb59c1a186d9fa448 (diff)
downloadmpd-2cf96abcc15873ec5770b5933a3a7b3d28af8bdc.tar.gz
mpd-2cf96abcc15873ec5770b5933a3a7b3d28af8bdc.tar.xz
mpd-2cf96abcc15873ec5770b5933a3a7b3d28af8bdc.zip
command: fix adding local files on !WIN32
Due to a typo, adding local files was always denied. Disable the second playlist_append_file() invocation on WIN32.
Diffstat (limited to '')
-rw-r--r--src/command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command.c b/src/command.c
index a8dc6284b..4ec679909 100644
--- a/src/command.c
+++ b/src/command.c
@@ -451,7 +451,7 @@ handle_add(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
enum playlist_result result;
if (strncmp(path, "file:///", 8) == 0) {
-#ifndef WIN32
+#ifdef WIN32
result = PLAYLIST_RESULT_DENIED;
#else
result = playlist_append_file(path + 7, client_get_uid(client),
@@ -486,9 +486,13 @@ handle_addid(struct client *client, int argc, char *argv[])
enum playlist_result result;
if (strncmp(argv[1], "file:///", 8) == 0)
+#ifdef WIN32
+ result = PLAYLIST_RESULT_DENIED;
+#else
result = playlist_append_file(argv[1] + 7,
client_get_uid(client),
&added_id);
+#endif
else
result = addToPlaylist(argv[1], &added_id);