summaryrefslogtreecommitdiff
path: root/src/directory.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-15 15:25:06 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-15 15:25:06 +0000
commit0b7d9b2dec6c5935c2147b7cb94022bdef8cfa38 (patch)
tree33b3a30a4dfaca9c9a69a679ff473225bf22deab /src/directory.c
parent55789de546a679bd8d7d559bb6d61d63db3fde45 (diff)
no point in tallying stats on writeDirectoryDB anymore
git-svn-id: https://svn.musicpd.org/mpd/trunk@774 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/directory.c')
-rw-r--r--src/directory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directory.c b/src/directory.c
index d7a7d582f..70b360822 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -789,8 +789,6 @@ int writeDirectoryDB() {
deleteEmptyDirectoriesInDirectory(mp3rootDirectory);
sortDirectory(mp3rootDirectory);
- stats.numberOfSongs = countSongsIn(stderr,NULL);
- stats.dbPlayTime = sumSongTimesIn(stderr,NULL);
while(!(fp=fopen(directorydb,"w")) && errno==EINTR);
if(!fp) return -1;
@@ -1128,6 +1126,8 @@ unsigned long sumSongTimesIn(FILE * fp, char * name) {
void initMp3Directory() {
mp3rootDirectory = newDirectory(NULL,0);
exploreDirectory(mp3rootDirectory);
+ stats.numberOfSongs = countSongsIn(stderr,NULL);
+ stats.dbPlayTime = sumSongTimesIn(stderr,NULL);
}
Song * getSongDetails(char * file, char ** shortnameRet,