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/directory_save.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 'src/directory_save.c')
-rw-r--r-- | src/directory_save.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directory_save.c b/src/directory_save.c index 300b2ec87..50ae21fdf 100644 --- a/src/directory_save.c +++ b/src/directory_save.c @@ -36,7 +36,7 @@ directory_save(FILE *fp, struct directory *directory) size_t i; int retv; - if (!isRootDirectory(directory->path)) { + if (!directory_is_root(directory)) { retv = fprintf(fp, "%s%s\n", DIRECTORY_BEGIN, directory_get_path(directory)); if (retv < 0) @@ -57,7 +57,7 @@ directory_save(FILE *fp, struct directory *directory) songvec_save(fp, &directory->songs); - if (!isRootDirectory(directory->path) && + if (!directory_is_root(directory) && fprintf(fp, DIRECTORY_END "%s\n", directory_get_path(directory)) < 0) return -1; |