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

Add function ZIPReader::file_exists #76860

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

AThousandShips
Copy link
Member

@AThousandShips AThousandShips commented May 8, 2023

Closes: godotengine/godot-proposals#6834

I assumed it should consider a file it can find but not open as it not existing, essentially as a "will it make read_file not throw an error"

@Calinou Calinou added this to the 4.x milestone May 8, 2023
@Swarkin
Copy link
Contributor

Swarkin commented May 9, 2023

Thanks, this helps a lot!

Before (Godot 4.0.2):
image

After compiling the editor from this PR and changing my code to use file_exists instead of get_files this is the result:
image

@AThousandShips
Copy link
Member Author

Thank you for providing a benchmark example

Copy link
Member

@akien-mga akien-mga 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.

@akien-mga akien-mga modified the milestones: 4.x, 4.2 Aug 16, 2023
@akien-mga akien-mga merged commit 3518a30 into godotengine:master Aug 16, 2023
@AThousandShips AThousandShips deleted the zip_file_exists branch August 16, 2023 15:04
@akien-mga
Copy link
Member

Thanks!

@AThousandShips
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants