directory: printDirectoryInfo() does not call commandError()

Move another ocurrence of error handling over to command.c.
This commit is contained in:
Max Kellermann
2008-09-07 13:49:01 +02:00
parent f320c9fa1d
commit 17b6491bcf
2 changed files with 4 additions and 4 deletions

View File

@@ -850,10 +850,8 @@ int printDirectoryInfo(int fd, const char *name)
{
Directory *directory;
if ((directory = getDirectory(name)) == NULL) {
commandError(fd, ACK_ERROR_NO_EXIST, "directory not found");
if ((directory = getDirectory(name)) == NULL)
return -1;
}
printDirectoryList(fd, directory->subDirectories);
printSongInfoFromList(fd, directory->songs);