bk
bk copied to clipboard
Support Windows-style container.xml file path and allow chapter failed to be parsed
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:
- This epub file has Windows-style path:
META-INF\container.xmlinstead ofMETA-INF/container.xml. - Some chapters are failed to be parsed. Issue may come from
roxmltree.
Fix:
- Try to read
META-INF\container.xmlif fileMETA-INF/container.xmldoes not exist. - Although issue may come from
romlxtree,bkcan just simply ignore fault chapter, and continue to parse other chapters.