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

[Windows] Improve warning for path casing. #71975

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

AThousandShips
Copy link
Member

@AThousandShips AThousandShips commented Jan 24, 2023

Expands the warning for case mismatch for paths, restricted to paths in res:// and user:// and relative paths, partially to avoid false positives I ran into with fonts (it seems that the system font lookup gives you WINDOWS regardless of the actual spelling on your computer), and my reasoning is that absolute paths are unlikely to be portable anyway, nor do I even think they are advisable in a project.

Related to #52231 but not a complete solution for that, but probably relevant for the implementation. But I think a more helpful check here will still be needed for dynamic cases even if hardcoded paths in scripts and scenes should be fixed some way.

Edit:
There is a now unused fix for casing in os_windows but I'm leaving that there for now unless told otherwise.

@akien-mga
Copy link
Member

Poke @bruvzg

@AThousandShips
Copy link
Member Author

Gonna just test this on my own build for completeness today unless you did so @bruvzg, haven't rested this for the better part of a year so wanna make sure

@bruvzg
Copy link
Member

bruvzg commented Apr 29, 2024

Gonna just test this on my own build for completeness today unless you did so @bruvzg, haven't rested this for the better part of a year so wanna make sure

For the reference, I have only looked at the code, and it looks fine to me, have not tested it on Windows.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Apr 29, 2024
@AThousandShips
Copy link
Member Author

Had it in my working branch and it correctly reports path casing errors in full paths like res://asteroids/Asteroid.gd for the proper res://Asteroids/Asteroid.gd, didn't check the user:// path but it's equivalent

@akien-mga akien-mga merged commit c7a73e6 into godotengine:master Apr 29, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@AThousandShips AThousandShips deleted the file_case_warning branch April 29, 2024 08:17
@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.

None yet

4 participants