aboutsummaryrefslogtreecommitdiffstats
path: root/src/song_print.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:55:52 +0200
committerMax Kellermann <max@duempel.org>2008-10-08 11:55:52 +0200
commit22645abc108ee672a78ace4fdeaeb80e2a0d82e6 (patch)
treee9b9014085fbc4229e97e342360e212cf73208a6 /src/song_print.c
parente8413541f494b63f397ecf93a5a0d6a1e0a69202 (diff)
downloadmpd-22645abc108ee672a78ace4fdeaeb80e2a0d82e6.tar.gz
mpd-22645abc108ee672a78ace4fdeaeb80e2a0d82e6.tar.xz
mpd-22645abc108ee672a78ace4fdeaeb80e2a0d82e6.zip
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.
Diffstat (limited to '')
-rw-r--r--src/song_print.c2
1 files changed, 1 insertions, 1 deletions
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 {