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.
This commit is contained in:
Max Kellermann 2008-10-09 19:14:04 +02:00
parent 9935ef4034
commit a9799218ab

View File

@ -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 *