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

Prevent folder names with trailing periods from being used automatically #93564

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jun 24, 2024

Folder names ending with one or more . characters are not allowed on Windows, so this would break writing logs, shader cache and other project-specific files. Trailing periods are now stripped in this case.

On non-Windows platforms, this change still applies in the interest of portability.

This is technically a small breakage on non-Windows platforms because of this, but very few projects had user directory names that ended with . anyway (as it didn't work on Windows).

Testing project: test_project_periods.zip

@Mickeon
Copy link
Contributor

Mickeon commented Jun 24, 2024

Dumb question, what about MacOS or any other build of the engine? Is the trailing period already trimmed, or is it plainly allowed? Or does this PR already catch all of them?

@Calinou
Copy link
Member Author

Calinou commented Jun 24, 2024

Dumb question, what about MacOS or any other build of the engine? Is the trailing period already trimmed, or is it plainly allowed? Or does this PR already catch all of them?

It's not currently trimmed in master, but this PR trims it on all platforms. See the PR's description for rationale.

Note that the Custom User Dir Name project setting is not affected by this trimming, so you can still use trailing periods (at your own risk).
Edit: It's affected by this trimming now.

Copy link
Member

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. I haven't tested it.

Folder names ending with one or more `.` characters are not allowed
on Windows, so this would break writing logs, shader cache and other
project-specific files. Trailing periods are now stripped in this case.

On non-Windows platforms, this change still applies in the interest
of portability.
@Calinou Calinou force-pushed the project-user-dir-prevent-trailing-periods branch from bd2709d to 492787b Compare June 26, 2024 15:43
@Calinou Calinou requested a review from a team as a code owner June 26, 2024 15:43
@akien-mga akien-mga merged commit 6cdd303 into godotengine:master Jun 26, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants