From ea8ae68e6f1a686fd96530fdaf7b428e33f58ec4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Jan 2009 19:08:52 +0100 Subject: directory: added directory_is_root() directory_is_root() is cheaper than isRootDirectory(directory_get_path()). --- 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 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 { -- cgit v1.2.3