From a9799218ab40af78af70f98652568da17475b773 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 9 Oct 2008 19:14:04 +0200 Subject: update: copy stat to new directory When reading a new directory, copy the stat data (which we have anyway) to the directory struct. This may save a stat() in the future. --- src/update.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/update.c b/src/update.c index 48fe03f95..a1cca3005 100644 --- a/src/update.c +++ b/src/update.c @@ -376,7 +376,9 @@ directory_make_child_checked(struct directory *parent, const char *path) if (conflicting) delete_song(parent, conflicting); - return directory_new_child(parent, path); + directory = directory_new_child(parent, path); + directory_set_stat(directory, &st); + return directory; } static struct directory * -- cgit v1.2.3