summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dbUtils.c4
-rw-r--r--src/song_print.c2
-rw-r--r--src/update.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index f7a495501..ddd4a024f 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -61,7 +61,7 @@ static int
printDirectoryInDirectory(struct directory *directory, void *data)
{
struct client *client = data;
- if (directory->path) {
+ if (!isRootDirectory(directory->path)) {
client_printf(client, "directory: %s\n", directory_get_path(directory));
}
return 0;
@@ -371,7 +371,7 @@ sumSavedFilenameMemoryInDirectory(struct directory *dir, void *data)
{
int *sum = data;
- if (!dir->path)
+ if (isRootDirectory(dir->path))
return 0;
*sum += (strlen(directory_get_path(dir)) + 1
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 {
diff --git a/src/update.c b/src/update.c
index 550e9b1df..312609939 100644
--- a/src/update.c
+++ b/src/update.c
@@ -291,7 +291,7 @@ updateDirectory(struct directory *directory)
if (!utf8)
continue;
- if (directory->path)
+ if (!isRootDirectory(directory->path))
utf8 = pfx_dir(path_max_tmp, utf8, strlen(utf8),
dirname, strlen(dirname));
if (was_empty) {