Extra debug output
git-svn-id: https://svn.musicpd.org/mpd/trunk@6689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
54e6b27989
commit
4811eadb4a
@ -915,15 +915,24 @@ static void writeDirectoryInfo(FILE * fp, Directory * directory)
|
|||||||
{
|
{
|
||||||
ListNode *node = (directory->subDirectories)->firstNode;
|
ListNode *node = (directory->subDirectories)->firstNode;
|
||||||
Directory *subDirectory;
|
Directory *subDirectory;
|
||||||
|
int retv;
|
||||||
|
|
||||||
if (directory->path) {
|
if (directory->path) {
|
||||||
fprintf(fp, "%s%s\n", DIRECTORY_BEGIN,
|
retv = fprintf(fp, "%s%s\n", DIRECTORY_BEGIN,
|
||||||
getDirectoryPath(directory));
|
getDirectoryPath(directory));
|
||||||
|
if (retv < 0) {
|
||||||
|
ERROR("Failed to write data to database file: %s\n",strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (node != NULL) {
|
while (node != NULL) {
|
||||||
subDirectory = (Directory *) node->data;
|
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);
|
writeDirectoryInfo(fp, subDirectory);
|
||||||
node = node->nextNode;
|
node = node->nextNode;
|
||||||
}
|
}
|
||||||
@ -931,8 +940,12 @@ static void writeDirectoryInfo(FILE * fp, Directory * directory)
|
|||||||
writeSongInfoFromList(fp, directory->songs);
|
writeSongInfoFromList(fp, directory->songs);
|
||||||
|
|
||||||
if (directory->path) {
|
if (directory->path) {
|
||||||
fprintf(fp, "%s%s\n", DIRECTORY_END,
|
retv = fprintf(fp, "%s%s\n", DIRECTORY_END,
|
||||||
getDirectoryPath(directory));
|
getDirectoryPath(directory));
|
||||||
|
if (retv < 0) {
|
||||||
|
ERROR("Failed to write data to database file: %s\n",strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user