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

DirAccessPack: Fix dir_exists and file_exists for res:// paths #31440

Merged
merged 1 commit into from
Aug 18, 2019

Conversation

akien-mga
Copy link
Member

Both methods check against containers using relative paths as index,
so the res:// part needs to be stripped.

Fixes #26009.


This is not perfect yet when it comes to DirAccessPack::file_exists, and FileAccessPack::file_exists is not implemented (like many other methods).

I'll work on a thorough test case for the DirAccess and FileAccess APIs to ensure that they behave the same on all platforms + packed flavors, or that expected inconsistencies are well documented.

Both methods check against containers using relative paths as index,
so the `res://` part needs to be stripped.

Fixes godotengine#26009.
@akien-mga akien-mga added this to the 3.2 milestone Aug 17, 2019
@akien-mga akien-mga merged commit 343466c into godotengine:master Aug 18, 2019
@akien-mga akien-mga deleted the diraccesspack-dir_exists branch November 8, 2019 13:27
@akien-mga
Copy link
Member Author

Cherry-picked for 3.1.2.

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.

Directory.dir_exists() always returns False in *exported* projects
1 participant