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

fix: download small zip error #16

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

horw
Copy link
Contributor

@horw horw commented Oct 27, 2023

When you tried to download a small zip file, you encountered the following error. This PR fix it.

Traceback (most recent call last):
  File "/home/horw/PycharmProjects/unzip-http/unzip-http", line 122, in <module>
    main(args)
  File "/home/horw/PycharmProjects/unzip-http/unzip-http", line 103, in main
    for f in rzf.infolist():
  File "/home/horw/PycharmProjects/unzip-http/unzip_http.py", line 119, in infolist
    return list(self.infoiter())
  File "/home/horw/PycharmProjects/unzip-http/unzip_http.py", line 147, in infoiter
    error('cannot find central directory')
  File "/home/horw/PycharmProjects/unzip-http/unzip_http.py", line 35, in error
    raise Exception(s)
Exception: cannot find central directory

Test file:
hello.zip

unzip_http.py Outdated Show resolved Hide resolved
Copy link
Owner

@saulpw saulpw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, @anjakefala can you verify?

@anjakefala anjakefala merged commit 69be9ae into saulpw:master Oct 30, 2023
@anjakefala
Copy link
Collaborator

@horw Works like a charm!

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.

3 participants