Extra debug output

git-svn-id: https://svn.musicpd.org/mpd/trunk@6689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Qball Cow 2007-07-16 20:31:37 +00:00
parent 54e6b27989
commit 4811eadb4a

View File

@ -915,15 +915,24 @@ static void writeDirectoryInfo(FILE * fp, Directory * directory)
{
ListNode *node = (directory->subDirectories)->firstNode;
Directory *subDirectory;
int retv;
if (directory->path) {
fprintf(fp, "%s%s\n", DIRECTORY_BEGIN,
retv = fprintf(fp, "%s%s\n", DIRECTORY_BEGIN,
getDirectoryPath(directory));
if (retv < 0) {
ERROR("Failed to write data to database file: %s\n",strerror(errno));
return;
}
}
while (node != NULL) {
subDirectory = (Directory *) node->data;
fprintf(fp, "%s%s\n", DIRECTORY_DIR, node->key);
retv = fprintf(fp, "%s%s\n", DIRECTORY_DIR, node->key);
if (retv < 0) {
ERROR("Failed to write data to database file: %s\n",strerror(errno));
return;
}
writeDirectoryInfo(fp, subDirectory);
node = node->nextNode;
}
@ -931,8 +940,12 @@ static void writeDirectoryInfo(FILE * fp, Directory * directory)
writeSongInfoFromList(fp, directory->songs);
if (directory->path) {
fprintf(fp, "%s%s\n", DIRECTORY_END,
retv = fprintf(fp, "%s%s\n", DIRECTORY_END,
getDirectoryPath(directory));
if (retv < 0) {
ERROR("Failed to write data to database file: %s\n",strerror(errno));
return;
}
}
}