diff options
author | Max Kellermann <max@duempel.org> | 2012-02-02 17:59:46 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-02-02 17:59:51 +0100 |
commit | 3edd4a24afe295eaf4b811a265318338b6690af2 (patch) | |
tree | d1124a981077474f8c247e9202cd503619c59e4f /src/update_walk.c | |
parent | 535a61b5a9aa3a6b0ca005acc29cbcf4bcaf5fe7 (diff) | |
download | mpd-3edd4a24afe295eaf4b811a265318338b6690af2.tar.gz mpd-3edd4a24afe295eaf4b811a265318338b6690af2.tar.xz mpd-3edd4a24afe295eaf4b811a265318338b6690af2.zip |
update_walk: use directory_make_child()
Diffstat (limited to 'src/update_walk.c')
-rw-r--r-- | src/update_walk.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/update_walk.c b/src/update_walk.c index e5eedc025..1d7f89c49 100644 --- a/src/update_walk.c +++ b/src/update_walk.c @@ -344,11 +344,8 @@ update_archive_tree(struct directory *directory, char *name) if (tmp) { *tmp = 0; //add dir is not there already - if ((subdir = directory_get_child(directory, name)) == NULL) { - //create new directory - subdir = directory_new_child(directory, name); - subdir->device = DEVICE_INARCHIVE; - } + subdir = directory_make_child(directory, name); + subdir->device = DEVICE_INARCHIVE; //create directories first update_archive_tree(subdir, tmp+1); } else { |