Skip to content
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

Bug in list of directory in zip #66

Closed
belldandyxtq opened this issue Oct 1, 2019 · 0 comments · Fixed by #68
Closed

Bug in list of directory in zip #66

belldandyxtq opened this issue Oct 1, 2019 · 0 comments · Fixed by #68
Assignees
Labels
cat:bug Bug report or fix.

Comments

@belldandyxtq
Copy link
Member

This is two bugs when list directory in zip

ZIP:

tianqi@host:tianqi$ unzip -l test.zip
Archive:  test.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2019-08-16 15:11   test/
       12  2019-07-24 13:13   test/file
        0  2019-08-16 15:11   test/dir/
        0  2019-08-16 15:11   test/dir/nested_dir/
      170  2019-07-24 13:16   test/file.zip
      167  2019-01-16 16:53   python.py
---------                     -------
      349                     6 files

Bug 1

>>> import chainerio
>>> handler = chainerio.open_as_container('test.zip')
>>> list(handler.list('test/'))
['file', 'dir', 'file.zip', 'python.py']

Where python.py is not in test/

Bug 2

>>> import chainerio
>>> handler = chainerio.open_as_container('test.zip')
>>> list(handler.list('test'))
['python.py']
@belldandyxtq belldandyxtq added the cat:bug Bug report or fix. label Oct 1, 2019
@belldandyxtq belldandyxtq self-assigned this Oct 1, 2019
belldandyxtq added a commit that referenced this issue Oct 2, 2019
This commit fixes the two bugs mentioned in #66
belldandyxtq added a commit that referenced this issue Oct 2, 2019
Add tests to cover the cases in issue #66
belldandyxtq added a commit that referenced this issue Oct 2, 2019
Add tests to cover the cases in issue #66
belldandyxtq added a commit that referenced this issue Oct 2, 2019
This commit fixes the two bugs mentioned in #66
belldandyxtq added a commit that referenced this issue Oct 2, 2019
Add tests to cover the cases in issue #66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:bug Bug report or fix.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant