+ next dev. of kiwix-manage

This commit is contained in:
kelson42 2011-04-17 17:12:49 +00:00
parent 185ce278b2
commit 9414d7f1ec

View File

@ -53,7 +53,15 @@ int main(int argc, char **argv) {
/* SHOW */
if (action == SHOW) {
if (!libraryManager.readFile(libraryPath)) {
if (libraryManager.readFile(libraryPath)) {
kiwix::Library library = libraryManager.cloneLibrary();
std::vector<kiwix::Book>::iterator itr;
unsigned int inc = 1;
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {
std::cout << "#" << inc++ << ": " << itr->path << std::endl;
}
} else {
std::cerr << "Unable to read the library file '" << libraryPath << "'." << std::endl;
exit(1);
}