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:
parent
9935ef4034
commit
a9799218ab
@ -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 *
|
||||||
|
Loading…
Reference in New Issue
Block a user