diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 11:55:52 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-08 11:55:52 +0200 |
commit | 22645abc108ee672a78ace4fdeaeb80e2a0d82e6 (patch) | |
tree | e9b9014085fbc4229e97e342360e212cf73208a6 /src/dbUtils.c | |
parent | e8413541f494b63f397ecf93a5a0d6a1e0a69202 (diff) | |
download | mpd-22645abc108ee672a78ace4fdeaeb80e2a0d82e6.tar.gz mpd-22645abc108ee672a78ace4fdeaeb80e2a0d82e6.tar.xz mpd-22645abc108ee672a78ace4fdeaeb80e2a0d82e6.zip |
directory: fix update in root directory
Commit 0bfe7802 broke update for new files in the root directory,
because music_root->path was an empty string and not NULL. There were
some NULL tests missing. Change them to !isRootDirectory(path)
instead of path!=NULL.
Diffstat (limited to '')
-rw-r--r-- | src/dbUtils.c | 4 |
1 files changed, 2 insertions, 2 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 |