aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbUtils.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-12 17:38:52 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-12 17:38:52 +0000
commit0473f3ea76c57be8b20e1fae628ec7ae7f04b5f7 (patch)
tree193c9408ec9d1ddf29adeb535fc88eb1f09d676e /src/dbUtils.c
parentee26cc33b60bab97972fe94c0908f181c6527c6a (diff)
downloadmpd-0473f3ea76c57be8b20e1fae628ec7ae7f04b5f7.tar.gz
mpd-0473f3ea76c57be8b20e1fae628ec7ae7f04b5f7.tar.xz
mpd-0473f3ea76c57be8b20e1fae628ec7ae7f04b5f7.zip
don't store only relative paths in the directory structure, its probably not
worth the savings in memory for the extra cpu it requires git-svn-id: https://svn.musicpd.org/mpd/trunk@2630 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/dbUtils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index 9c08c8020..2f915a13a 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -111,7 +111,7 @@ int countSongsInDirectory(FILE * fp, Directory * directory, void * data) {
}
int printDirectoryInDirectory(FILE * fp, Directory * directory, void * data) {
- if(directory->name) {
+ if(directory->path) {
myfprintf(fp,"directory: %s\n", getDirectoryPath(directory));
}
return 0;
@@ -362,7 +362,7 @@ int listAllUniqueTags(FILE * fp, int type, int numConditionals,
int sumSavedFilenameMemoryInDirectory(FILE * fp, Directory * dir, void * data) {
int * sum = data;
- if(!dir->name) return 0;
+ if(!dir->path) return 0;
*sum += (strlen(getDirectoryPath(dir))+1-sizeof(Directory *))*
dir->songs->numberOfNodes;
@@ -390,12 +390,12 @@ void printSavedMemoryFromFilenames() {
int sumSavedDirectoryNameMemoryInDirectory(FILE * fp, Directory * dir, void * data) {
int * sum = data;
- if(!dir->name) return 0;
+ if(!dir->path) return 0;
*sum += (strlen(getDirectoryPath(dir))+1)*
dir->subDirectories->numberOfNodes;
- *sum += strlen(dir->name)+1;
+ *sum += strlen(dir->path)+1;
return 0;
}