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.
This commit is contained in:
parent
7a8ef820a4
commit
2cf96abcc1
@ -451,7 +451,7 @@ handle_add(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
|
|||||||
enum playlist_result result;
|
enum playlist_result result;
|
||||||
|
|
||||||
if (strncmp(path, "file:///", 8) == 0) {
|
if (strncmp(path, "file:///", 8) == 0) {
|
||||||
#ifndef WIN32
|
#ifdef WIN32
|
||||||
result = PLAYLIST_RESULT_DENIED;
|
result = PLAYLIST_RESULT_DENIED;
|
||||||
#else
|
#else
|
||||||
result = playlist_append_file(path + 7, client_get_uid(client),
|
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;
|
enum playlist_result result;
|
||||||
|
|
||||||
if (strncmp(argv[1], "file:///", 8) == 0)
|
if (strncmp(argv[1], "file:///", 8) == 0)
|
||||||
|
#ifdef WIN32
|
||||||
|
result = PLAYLIST_RESULT_DENIED;
|
||||||
|
#else
|
||||||
result = playlist_append_file(argv[1] + 7,
|
result = playlist_append_file(argv[1] + 7,
|
||||||
client_get_uid(client),
|
client_get_uid(client),
|
||||||
&added_id);
|
&added_id);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
result = addToPlaylist(argv[1], &added_id);
|
result = addToPlaylist(argv[1], &added_id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user