aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbUtils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbUtils.c')
-rw-r--r--src/dbUtils.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index 3699ab72a..51e991130 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -60,8 +60,8 @@ int countSongsInDirectory(FILE * fp, Directory * directory, void * data) {
}
int printDirectoryInDirectory(FILE * fp, Directory * directory, void * data) {
- if(directory->utf8name) {
- myfprintf(fp,"directory: %s\n",directory->utf8name);
+ if(directory->name) {
+ myfprintf(fp,"directory: %s\n", getDirectoryPath(directory));
}
return 0;
}
@@ -273,13 +273,15 @@ int listAllUniqueTags(FILE * fp, int type, int numConditionals,
int sumSavedMemoryInDirectory(FILE * fp, Directory * dir, void * data) {
int * sum = data;
- if(!dir->utf8name) return 0;
+ if(!dir->name) return 0;
- *sum += (strlen(dir->utf8name)+1-sizeof(Directory *))*
+ *sum += (strlen(getDirectoryPath(dir))+1-sizeof(Directory *))*
dir->songs->numberOfNodes;
- /**sum += (strlen(dir->utf8name)+1)*
- dir->subDirectories->numberOfNodes;*/
+ *sum += (strlen(getDirectoryPath(dir))+1)*
+ dir->subDirectories->numberOfNodes;
+
+ *sum += strlen(dir->name)+1;
return 0;
}