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

ZIPReader cannot open empty zip file #73271

Closed
DukeVengeance opened this issue Feb 14, 2023 · 0 comments · Fixed by #73310
Closed

ZIPReader cannot open empty zip file #73271

DukeVengeance opened this issue Feb 14, 2023 · 0 comments · Fixed by #73310
Milestone

Comments

@DukeVengeance
Copy link

DukeVengeance commented Feb 14, 2023

Godot version

4.0.rc1

System information

Windows 10

Issue description

ZIPReader cannot open empty zip files.
When trying to open an empty zip file, a very generic error FAILED (1) is returned, if opening an empty zip file should fail, the returned error code should at least be more specific.
The issue is probably related to no file index in an empty zip file.

Steps to reproduce

For convenience, empty.zip and not_empty.zip are created in user:// , with an empty text file in not_empty.zip

func _ready() -> void:
	var zip := ZIPReader.new();
	var error := zip.open("user://empty.zip");
	print(error_string(error)); # -> FAILED
	var error2 := zip.open("user://not_empty.zip");
	print(error_string(error2)); # -> OK

Minimal reproduction project

N/A

@akien-mga akien-mga added this to the 4.x milestone Feb 15, 2023
@akien-mga akien-mga changed the title [4.0 RC1] ZIPReader cannot open empty zip file ZIPReader cannot open empty zip file Jun 19, 2023
@akien-mga akien-mga modified the milestones: 4.x, 4.2 Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants