diff options
-rw-r--r-- | src/song.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/song.c b/src/song.c index aa6641020..a524dca93 100644 --- a/src/song.c +++ b/src/song.c @@ -85,7 +85,7 @@ void song_free(struct mpd_song * song) ssize_t song_print_url(struct mpd_song *song, int fd) { - if (song->parent && song->parent->path) + if (song->parent && song->parent != &music_root) return fdprintf(fd, "%s%s/%s\n", SONG_FILE, directory_get_path(song->parent), song->url); return fdprintf(fd, "%s%s\n", SONG_FILE, song->url); @@ -240,7 +240,7 @@ char *song_get_url(struct mpd_song *song, char *path_max_tmp) assert(*song->url); - if (!song->parent || !song->parent->path) + if (!song->parent || song->parent == &music_root) strcpy(path_max_tmp, song->url); else pfx_dir(path_max_tmp, song->url, strlen(song->url), |