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

Determine ProjectSettings' resource path early #64925

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

RandomShaper
Copy link
Member

@RandomShaper RandomShaper commented Aug 26, 2022

Consider the following sequence:

  • On some platform Godot tries to find the relevant PCK.
  • One of the attempts is for executable_path.pck.
  • FileAccess does fix_path(), which for ACCESS_FILESYSTEM calls ProjectSettings::get_singleton()->get_resource_path().
  • Such resource path hasn't been already set so early.
  • Therefore, in that platform, in which every real file system path must be prefixed will receive an invalid path on FileAccess::open().

This PR fixes that pathological case by just letting ProjectSettings fill the resource path value earlier.

Separate PR submitted for 3.x: #64926.

@akien-mga akien-mga merged commit ee461b7 into godotengine:master Aug 26, 2022
@akien-mga
Copy link
Member

Thanks!

@RandomShaper RandomShaper deleted the ps_res_path branch August 26, 2022 21:39
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.

2 participants