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

Fix ghc directory iterator treating all files subsequent to a symlink as symlink #63612

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Feb 16, 2023

Summary

Bugfixes "Fix files after a symlink in a directory all treated as symlink on Windows"

Purpose of change

The game does not handle directory with symlinks in it correctly on Windows, so if a player has a symlink in their gfx directory that points to another tileset repo, none of the tilesets after that tileset will be listed in the options.

Describe the solution

Check a file is actually a reparse point before checking its reparse tag to avoid getting an undefined value. Also removed a hack that uses structure size to deteremine structure type.

Describe alternatives you've considered

Testing

All tilesets are now listed, and the game did not explode when loading a save.

Additional context

I plan to PR this patch upstream too, but for now we can include in our repo first.

@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Feb 16, 2023
@NetSysFire NetSysFire added the OS: Windows Issues related to Windows operating system label Feb 16, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 16, 2023
@dseguin dseguin merged commit a3a639e into CleverRaven:master Feb 20, 2023
@Qrox Qrox deleted the symlink branch March 12, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions OS: Windows Issues related to Windows operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants