diff options
author | Max Kellermann <max@duempel.org> | 2009-01-04 19:08:52 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-04 19:08:52 +0100 |
commit | ea8ae68e6f1a686fd96530fdaf7b428e33f58ec4 (patch) | |
tree | 78752b26afcbc4807164c35721a6f99a540e93cd /src/dbUtils.c | |
parent | 923d2c966f2b8a3582156467ad46ea8d200b30f1 (diff) | |
download | mpd-ea8ae68e6f1a686fd96530fdaf7b428e33f58ec4.tar.gz mpd-ea8ae68e6f1a686fd96530fdaf7b428e33f58ec4.tar.xz mpd-ea8ae68e6f1a686fd96530fdaf7b428e33f58ec4.zip |
directory: added directory_is_root()
directory_is_root() is cheaper than
isRootDirectory(directory_get_path()).
Diffstat (limited to '')
-rw-r--r-- | src/dbUtils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c index d73366e67..3677b2ae6 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -64,9 +64,10 @@ static int printDirectoryInDirectory(struct directory *directory, void *data) { struct client *client = data; - if (!isRootDirectory(directory->path)) { + + if (!directory_is_root(directory)) client_printf(client, "directory: %s\n", directory_get_path(directory)); - } + return 0; } @@ -374,7 +375,7 @@ sumSavedFilenameMemoryInDirectory(struct directory *dir, void *data) { int *sum = data; - if (isRootDirectory(dir->path)) + if (directory_is_root(dir)) return 0; *sum += (strlen(directory_get_path(dir)) + 1 |