-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Be able to open zim archive from several fds. #860
Conversation
f3a9689
to
a8bc501
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'd like to confirm that assessment on a clean (rebased-and-fixed-up) version of the PR.
a8bc501
to
d9a0144
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #860 +/- ##
==========================================
+ Coverage 57.63% 57.77% +0.14%
==========================================
Files 99 100 +1
Lines 4596 4616 +20
Branches 1926 1935 +9
==========================================
+ Hits 2649 2667 +18
+ Misses 675 669 -6
- Partials 1272 1280 +8 ☔ View full report in Codecov by Sentry. |
FilePart don't have to "map" the whole file on the FS. Only a section of the file may be a part of our archive. (Think about file parts being stored in a zip)
Has FilePart now have offsets, we can move the "offset concept" out of FileImpl. FileImpl always read from "offset" 0 in FileCompound. If it appears that we have an offset inside a file, it will be FilePart which will handle it.
d9a0144
to
7a18e5b
Compare
Ready for a (final) review. Missing coverage is about error handling code, which is difficult to test as we need to generate io errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of minor suggestions for improvement but nothing bad will happen if the PR is merged as is.
Close opened file descriptor in test before checking equivalence.
7a18e5b
to
57fa6f1
Compare
Two suggested improvements have been followed. Directly rebased/fixup. |
Pr #860 removed the constructor from (fd, offset, size). This is a API break and we don't want that.
Fix #841
The tests in this PR need a update of zim-testing-suite (openzim/zim-testing-suite#7)