aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dbUtils.c5
-rw-r--r--src/update.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index aa7e639b7..9e307efc6 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -57,9 +57,8 @@ static int countSongsInDirectory(struct directory *directory, void *data)
static int printDirectoryInDirectory(struct directory *directory, void *data)
{
int fd = (int)(size_t)data;
- if (directory->path) {
+ if (!isRootDirectory(directory->path))
fdprintf(fd, "directory: %s\n", directory_get_path(directory));
- }
return 0;
}
@@ -340,7 +339,7 @@ static int 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/update.c b/src/update.c
index 989b8f943..1cf6f3537 100644
--- a/src/update.c
+++ b/src/update.c
@@ -283,7 +283,7 @@ enum update_return 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) {