Skip to content

Comments

Fix #10: workaround for handle unsorted zip entry.#11

Open
Bedotech wants to merge 1 commit intoaogail:masterfrom
Bedotech:fix/10-check-directory-before-extract
Open

Fix #10: workaround for handle unsorted zip entry.#11
Bedotech wants to merge 1 commit intoaogail:masterfrom
Bedotech:fix/10-check-directory-before-extract

Conversation

@Bedotech
Copy link

@Bedotech Bedotech commented Nov 7, 2017

@aogail please review this is to handle case as #10 !

@aogail
Copy link
Owner

aogail commented Nov 7, 2017

Thanks for the PR.

Can you add a test case that involves a zip file with this issue?

I also wonder whether manually creating the parent directory in this way could interfere with metadata about the parent in the zip file.

@Bedotech
Copy link
Author

Bedotech commented Nov 8, 2017

Hi @aogail, the tests work well? i try to execute the procedure as described in the README.md before require vagrant winrm plugin but once the plugin is installed it doesn't execute a VM or somethings similar.

Al the output is:

/usr/bin/ruby -I/usr/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib:/usr/lib/ruby/gems/2.4.0/gems/rspec-support-3.6.0/lib /usr/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
..

Finished in 0.08975 seconds (files took 1.03 seconds to load)
2 examples, 0 failures

And no VM is started.can you please tell me whats kind of test and where you expect to be executed?

@aogail
Copy link
Owner

aogail commented Nov 8, 2017

I meant that this is new behavior so it deserves a new integration test. The current integration tests use Test Kitchen to spin up a VM and extract a known zip file, then assert that the expected files came out. The integration tests may be executed using rake test.

A new test case to verify this new behavior would involve creating a zip file that triggers the behavior described in #10 and verifying that the zipfile resource extracts it correctly. I would also like to confirm that, if directory entries have metadata (modification time, permissions, etc.), they are correctly handled in this out of order case.

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.

2 participants