diff options
author | Max Kellermann <max@duempel.org> | 2008-10-09 19:14:04 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-09 19:14:04 +0200 |
commit | a9799218ab40af78af70f98652568da17475b773 (patch) | |
tree | 7a8b34edf8b9af5ab09aa562eb2df05da796ec58 /src/update.c | |
parent | 9935ef403473664807f6ecab5992d4750f38d7ed (diff) | |
download | mpd-a9799218ab40af78af70f98652568da17475b773.tar.gz mpd-a9799218ab40af78af70f98652568da17475b773.tar.xz mpd-a9799218ab40af78af70f98652568da17475b773.zip |
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.
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 * |