diff options
author | Max Kellermann <max@duempel.org> | 2008-10-09 19:14:04 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:51 -0700 |
commit | 120aa4bfb5c0b6962ee50559c0263f8e850f2c88 (patch) | |
tree | 9816d60cd1d150a195850854b4cbf44017861321 /src | |
parent | e2d7fa53aa587b874709d441ecc782f745fd4b3e (diff) | |
download | mpd-120aa4bfb5c0b6962ee50559c0263f8e850f2c88.tar.gz mpd-120aa4bfb5c0b6962ee50559c0263f8e850f2c88.tar.xz mpd-120aa4bfb5c0b6962ee50559c0263f8e850f2c88.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')
-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 410d906ff..c8eb33b6d 100644 --- a/src/update.c +++ b/src/update.c @@ -361,7 +361,9 @@ directory_make_child_checked(struct directory *parent, const char *path) if ((conflicting = songvec_find(&parent->songs, mpd_basename(path)))) 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 * |