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:
		| @@ -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 * | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann