From 8c0060fae44a94bdfe978d8d4a66589f5a03a074 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Oct 2008 22:35:13 +0200 Subject: playlist: added support for adding songs not in the music database Clients which have authenticated via unix socket may add local files to the MPD playlist, provided that they own the file. --- src/song.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/song.c') diff --git a/src/song.c b/src/song.c index b4ab28cab..9bc44f4a0 100644 --- a/src/song.c +++ b/src/song.c @@ -54,7 +54,7 @@ song_remote_new(const char *url) struct song * song_file_new(const char *path, struct directory *parent) { - assert(parent != NULL); + assert((parent == NULL) == (*path == '/')); return song_alloc(path, parent); } @@ -65,7 +65,7 @@ song_file_load(const char *path, struct directory *parent) struct song *song; bool ret; - assert(parent != NULL); + assert((parent == NULL) == (*path == '/')); if (strchr(path, '\n')) { DEBUG("newSong: '%s' is not a valid uri\n", path); -- cgit v1.2.3