Commit a9799218 authored by Max Kellermann's avatar Max Kellermann

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.
parent 9935ef40
...@@ -376,7 +376,9 @@ directory_make_child_checked(struct directory *parent, const char *path) ...@@ -376,7 +376,9 @@ directory_make_child_checked(struct directory *parent, const char *path)
if (conflicting) if (conflicting)
delete_song(parent, 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 * static struct directory *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment