-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Fix ProjectSettings::localize_path
for Windows paths
#79342
Conversation
It seems like we have tests for |
cebdf83
to
2ea2f3a
Compare
CHECK_EQ(ProjectSettings::get_singleton()->localize_path("path/./filename"), "res://path/filename"); | ||
CHECK_EQ(ProjectSettings::get_singleton()->localize_path("path\\.\\filename"), "res://path/filename"); | ||
|
||
// FIXME?: These checks pass, but that doesn't seems correct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have passed before as well, this behavior isn't new. Only the last 4 checks are actually affected by this PR.
2ea2f3a
to
66000f4
Compare
66000f4
to
aee1e50
Compare
Thanks! |
GD.PushError
andGD.PushWarning
#79280 (comment)If a path with
\
was passed in it would never be recognized as being in the resource path and never become a local path. Thus move thesimplify_path
earlier to fix that. (The replace call is unnecessary because simplify_path already does that)(Tbh there are probably still edge cases where something like this can happen esp when involving symlinks or such)