aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 22:35:13 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 22:35:13 +0200
commit8c0060fae44a94bdfe978d8d4a66589f5a03a074 (patch)
treefde581584c25e5e74d8a8336f54dc61d4a5f67db /src/song.c
parent0b44cad2ce2c6433f395650a5a70cf8b3473673c (diff)
downloadmpd-8c0060fae44a94bdfe978d8d4a66589f5a03a074.tar.gz
mpd-8c0060fae44a94bdfe978d8d4a66589f5a03a074.tar.xz
mpd-8c0060fae44a94bdfe978d8d4a66589f5a03a074.zip
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.
Diffstat (limited to 'src/song.c')
-rw-r--r--src/song.c4
1 files changed, 2 insertions, 2 deletions
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);