-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
admin::render_readmes: Support out of order tar files
Achieves this by pulling the entire tar file into memory in the form of a hashmap. Then we can look for the files as needed. Before, we would stream the pkg response from the server and un-tar it on the fly, but this behavior is incorrect if the Cargo.toml isn't at the beginning of the archive. Could imagine this might be problematic if the entire archive won't fit in memory - but that seems unlikely? We could mitigate by limiting to certain file types, but we won't know what type the README will be. Added a test to for this case - the test fails before this change and passes with this change
- Loading branch information
1 parent
824055f
commit 38ce91a
Showing
1 changed file
with
38 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters