Skip to content

Commit

Permalink
Yet more debug logging for EPUB race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
codedread committed Jul 4, 2024
1 parent 9193ea1 commit 5dc9f12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,9 @@ export class Book extends EventTarget {
this.dispatchEvent(new BookProgressEvent(this, evt.totalPages, evt.message));
});

if (Params['debugFetch'] === 'true') {
console.log(`debugFetch: Calling BookBinder.start()`);
}
// Wait for its decompressing implementation to be loaded and ports connected.
await bookBinder.start();
this.#bookBinder = bookBinder;
Expand Down
2 changes: 1 addition & 1 deletion code/epub/epub-book-binder.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export class EPUBBookBinder extends BookBinder {
/** @private */
parseOPF_() {
assert(this.fileMap_.has(this.opfFilename_),
`EPUB archive file did not have a file named '${this.opfFilename_}`);
`EPUB archive file did not have a file named '${this.opfFilename_}'`);

const lastSlash = this.opfFilename_.lastIndexOf('/');
const rootDir = lastSlash === -1 ? '' : this.opfFilename_.substr(0, lastSlash + 1);
Expand Down

0 comments on commit 5dc9f12

Please sign in to comment.