Skip to content

Support Windows-style container.xml file path and allow chapter failed to be parsed #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dothanhtrung
Copy link

Hi, I have an epub file which can be opened in other application like FBReader, but bk crashed when open it.

(You can get the epub file at: http://www.mediafire.com/download/ff5jqt6w83v1dca/Thon+Phe+Tinh+Khong+-+Nga+Cat+Tay+Hong+Thi.epub)

$ bk Thon\ Phe\ Tinh\ Khong\ -\ Nga\ Cat\ Tay\ Hong\ Thi.epub 
thread 'main' panicked at src/epub.rs:49:14:
called `Result::unwrap()` on an `Err` value: FileNotFound
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Reason:

  1. This epub file has Windows-style path: META-INF\container.xml instead of META-INF/container.xml.
  2. Some chapters are failed to be parsed. Issue may come from roxmltree.

Fix:

  1. Try to read META-INF\container.xml if file META-INF/container.xml does not exist.
  2. Although issue may come from romlxtree, bk can just simply ignore fault chapter, and continue to parse other chapters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant