Skip to content

Commit

Permalink
chore: add log for no books dir
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniiriarios committed Apr 22, 2024
1 parent e1d55ae commit c4b1796
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions electron/data/bookData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { searchOpenLibraryWorkByISBN } from "../api/openLibrary";
*/
export function initBookDirs(dir: string) {
if (!fs.existsSync(dir)) {
log.warn(`Books directory missing, creating '${dir}'`);
fs.mkdirSync(dir, { recursive: true });
}
}
Expand Down

0 comments on commit c4b1796

Please sign in to comment.