Simplify script paths to ensure proper resource path checks #87124
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #87094.
Prevents script paths that could have partial dirs in them (e.g.
res://./addons/<...>
orres://folder1/../folder2/<...>
) by simplifying them.This issue manifested on a very specific case (#87094) of an addon with warnings, treating warnings as errors, and a script being supplied through the CLI interface with a preceding
./
. It caused the script path to becomeres://./addons/...
, which then fails this check and erroneously lets the warning be issued:godot/modules/gdscript/gdscript_parser.cpp
Lines 184 to 186 in 26b1fd0
If applying this fix to the
script_path
is risky, I can move it to this check instead.