From 22645abc108ee672a78ace4fdeaeb80e2a0d82e6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Oct 2008 11:55:52 +0200 Subject: directory: fix update in root directory Commit 0bfe7802 broke update for new files in the root directory, because music_root->path was an empty string and not NULL. There were some NULL tests missing. Change them to !isRootDirectory(path) instead of path!=NULL. --- src/song_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/song_print.c') diff --git a/src/song_print.c b/src/song_print.c index 879cf48ea..235142b37 100644 --- a/src/song_print.c +++ b/src/song_print.c @@ -26,7 +26,7 @@ void song_print_url(struct client *client, struct song *song) { - if (song->parent && song->parent->path) { + if (song->parent && !isRootDirectory(song->parent->path)) { client_printf(client, "%s%s/%s\n", SONG_FILE, directory_get_path(song->parent), song->url); } else { -- cgit v1.2.3