File tree Expand file tree Collapse file tree 2 files changed +1
-8
lines changed Expand file tree Collapse file tree 2 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -159,11 +159,9 @@ class Manager
159159 * Add all books from the directory tree into the library.
160160 *
161161 * @param path The path of the directory to scan.
162- * @param skipInvalid If the function should stop for an invalid file.
163162 * @param verboseFlag Verbose logs flag.
164163 */
165164 void addBooksFromDirectory (const std::string& path,
166- const bool skipInvalid = true ,
167165 const bool verboseFlag = false );
168166
169167 std::string writableLibraryPath;
Original file line number Diff line number Diff line change @@ -257,7 +257,6 @@ bool Manager::addBookFromPath(const std::string& pathToOpen,
257257}
258258
259259void Manager::addBooksFromDirectory (const std::string& path,
260- const bool skipInvalid,
261260 const bool verboseFlag)
262261{
263262 std::set<std::string> iteratedDirs;
@@ -285,11 +284,7 @@ void Manager::addBooksFromDirectory(const std::string& path,
285284 std::cout << " Already iterated over " << pathString << " . Skipping..." << std::endl;
286285 } else {
287286 if (!this ->addBookFromPath (pathString, pathString, " " , false )) {
288- if (skipInvalid)
289- std::cerr << " Skipping invalid file: " << pathString << std::endl;
290- else {
291- throw std::runtime_error (" Unable to add file: " + pathString + " into the library." );
292- }
287+ std::cerr << " Could not add " << pathString << " into the library." << std::endl;
293288 } else if (verboseFlag) {
294289 std::cout << " Added " << pathString << " into the library." << std::endl;
295290 totalBooksAdded++;
You can’t perform that action at this time.
0 commit comments