aboutsummaryrefslogtreecommitdiffstats
path: root/src/song_print.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 19:08:52 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 19:08:52 +0100
commitea8ae68e6f1a686fd96530fdaf7b428e33f58ec4 (patch)
tree78752b26afcbc4807164c35721a6f99a540e93cd /src/song_print.c
parent923d2c966f2b8a3582156467ad46ea8d200b30f1 (diff)
downloadmpd-ea8ae68e6f1a686fd96530fdaf7b428e33f58ec4.tar.gz
mpd-ea8ae68e6f1a686fd96530fdaf7b428e33f58ec4.tar.xz
mpd-ea8ae68e6f1a686fd96530fdaf7b428e33f58ec4.zip
directory: added directory_is_root()
directory_is_root() is cheaper than isRootDirectory(directory_get_path()).
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 235142b37..60e16f941 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 && !isRootDirectory(song->parent->path)) {
+ if (song_in_database(song) && !directory_is_root(song->parent)) {
client_printf(client, "%s%s/%s\n", SONG_FILE,
directory_get_path(song->parent), song->url);
} else {