-
Notifications
You must be signed in to change notification settings - Fork 29
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
Does not detect old Office formats #46
Comments
I experienced the same issues for both legacy Microsoft Office formats but also Problems observed
Potential root causeIs this because the "matching logic" is not hierarchical for some instances where it should? I do see some Potential solutionThis is not based on any study or deep understanding of the current code. While the "matchers" ordering implies that it should reliably work, this is not really the case. If matchers were traversed in a tree like structure vs a pure linear iteration, I think that the problem might go away.
WorkaroundThe "workaround" sadly lead to implementing the relevant logic manually. In my particular application, I'm only concerned about few known/supported file types and I'm also not necessarily doing a "super robust" job either (validations, etc.)
|
Here is my poor man mime detection logic (not robust): https://github.com/rimerosolutions/entrusted/blob/main/app/entrusted_container/src/mimetypes.rs I'd much prefer switching back to this crate when this issue is addressed. |
Not sure if that's related to #45 , but my program panicks with
thread 'main' panicked at 'assertion failed: sector_id < self.num_sectors', C:\Users\ian\.cargo\registry\src\github.com-1ecc6299db9ec823\cfb-0.4.0\src\internal\sector.rs:65:9
when I try to useinfer::get_from_path
to read .doc, .ppt and .xls files. I've created the files test.doc, test.xls and test.ppt to test this behavior, and except for test.ppt, they all cause the same error (I've included a different .ppt file which does crash for testing).I'm using v0.5.0 on Windows 10. The code is based on example/file.rs. Here are the files I used: infer.zip
The text was updated successfully, but these errors were encountered: