Skip to content

Conversation

@trung1-dothanh
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