directory: added directory_is_root()
directory_is_root() is cheaper than isRootDirectory(directory_get_path()).
This commit is contained in:
@@ -290,7 +290,7 @@ make_subdir(struct directory *parent, const char *name)
|
||||
if (directory == NULL) {
|
||||
char path[MPD_PATH_MAX];
|
||||
|
||||
if (isRootDirectory(directory_get_path(parent)))
|
||||
if (directory_is_root(parent))
|
||||
strcpy(path, name);
|
||||
else
|
||||
pfx_dir(path, name, strlen(name),
|
||||
|
Reference in New Issue
Block a user