diff options
Diffstat (limited to '')
-rw-r--r-- | src/command.c | 2 | ||||
-rw-r--r-- | src/dbUtils.c | 4 | ||||
-rw-r--r-- | src/directory_save.c | 4 | ||||
-rw-r--r-- | src/update.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/command.c b/src/command.c index 518bf5f0d..f583f82a1 100644 --- a/src/command.c +++ b/src/command.c @@ -571,7 +571,7 @@ static int handleLsInfo(int fd, mpd_unused int *permission, directory_print(fd, dir); - if (isRootDirectory(path)) + if (dir == &music_root) return lsPlaylists(fd, path); return 0; diff --git a/src/dbUtils.c b/src/dbUtils.c index 1fadb232e..418020d9e 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -57,7 +57,7 @@ static int countSongsInDirectory(struct directory *dir, void *data) static int printDirectoryInDirectory(struct directory *dir, void *data) { int fd = (int)(size_t)data; - if (!isRootDirectory(dir->path)) + if (dir != &music_root) fdprintf(fd, "directory: %s\n", directory_get_path(dir)); return 0; } @@ -339,7 +339,7 @@ static int sumSavedFilenameMemoryInDirectory(struct directory *dir, void *data) { int *sum = data; - if (!isRootDirectory(dir->path)) + if (dir != &music_root) return 0; *sum += (strlen(directory_get_path(dir)) + 1 diff --git a/src/directory_save.c b/src/directory_save.c index c39ece58a..e12de0019 100644 --- a/src/directory_save.c +++ b/src/directory_save.c @@ -45,7 +45,7 @@ int directory_save(int fd, struct directory *dir) struct dirvec *children = &dir->children; size_t i; - if (!isRootDirectory(dir->path) && + if ((dir != &music_root) && fdprintf(fd, DIRECTORY_BEGIN "%s\n", directory_get_path(dir)) < 0) return -1; @@ -70,7 +70,7 @@ int directory_save(int fd, struct directory *dir) if (fdprintf(fd, SONG_END "\n") < 0) return -1; - if (!isRootDirectory(dir->path) && + if ((dir != &music_root) && fdprintf(fd, DIRECTORY_END "%s\n", directory_get_path(dir)) < 0) return -1; diff --git a/src/update.c b/src/update.c index 3f6fa15ed..7c2a7570a 100644 --- a/src/update.c +++ b/src/update.c @@ -278,7 +278,7 @@ static int updateDirectory(struct directory *dir, const struct stat *st) if (!utf8) continue; - if (!isRootDirectory(dir->path)) + if (dir != &music_root) utf8 = pfx_dir(path_max_tmp, utf8, strlen(utf8), dirname, strlen(dirname)); |