aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/directory.c8
-rw-r--r--src/main.c2
-rw-r--r--src/tagTracker.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/directory.c b/src/directory.c
index 7bd9b9f61..9ad301092 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -979,9 +979,15 @@ void sortDirectory(Directory * directory) {
int writeDirectoryDB() {
FILE * fp;
+ DEBUG("removing empty directories from DB\n");
deleteEmptyDirectoriesInDirectory(mp3rootDirectory);
+
+ DEBUG("sorting DB\n");
+
sortDirectory(mp3rootDirectory);
+ DEBUG("writing DB\n");
+
while(!(fp=fopen(directory_db,"w")) && errno==EINTR);
if(!fp) return -1;
@@ -1077,6 +1083,8 @@ int readDirectoryDB() {
}
}
+ DEBUG("reading DB\n");
+
readDirectoryInfo(fp,mp3rootDirectory);
while(fclose(fp) && errno==EINTR);
diff --git a/src/main.c b/src/main.c
index 62c3a7626..d96718bc4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -433,7 +433,7 @@ int main(int argc, char * argv[]) {
printMemorySavedByTagTracker();
printSavedMemoryFromFilenames();
- printSavedMemoryFromDirectoryNames();
+ /*printSavedMemoryFromDirectoryNames();*/
daemonize(&options);
diff --git a/src/tagTracker.c b/src/tagTracker.c
index 16cbe004f..977e8746e 100644
--- a/src/tagTracker.c
+++ b/src/tagTracker.c
@@ -99,6 +99,8 @@ void sortTagTrackerInfo() {
for(i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) {
if(!tagLists[i]) continue;
+ DEBUG("sorting %s info\n", mpdTagItemKeys[i]);
+
sortList(tagLists[i]);
}
}