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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user