Skip to content

Fix crash under Proton due to case-sensitivity#128

Closed
Kaydax wants to merge 1 commit intoFacepunch:masterfrom
Kaydax:linux-patch1
Closed

Fix crash under Proton due to case-sensitivity#128
Kaydax wants to merge 1 commit intoFacepunch:masterfrom
Kaydax:linux-patch1

Conversation

@Kaydax
Copy link
Copy Markdown
Contributor

@Kaydax Kaydax commented Dec 14, 2025

For some God forsaken reason, forcing the path to be lowercase here under Proton causes a System.IO.DirectoryNotFoundException due to case-sensitivity. Removing ToLowerInvariant() in the creation of the LocalFileSystem fixes the issue and allows the game to boot under Proton again.

Copilot AI review requested due to automatic review settings December 14, 2025 02:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a crash when running the game under Proton (Linux compatibility layer for Windows games) by removing case normalization from filesystem path initialization. The issue occurred because Linux filesystems are case-sensitive, and converting the root folder path to lowercase caused a System.IO.DirectoryNotFoundException when the actual path contained uppercase letters.

  • Removes ToLowerInvariant() call when converting the root folder path in LocalFileSystem constructor
  • Allows the filesystem to respect the actual case of directory paths on case-sensitive filesystems

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@garrynewman
Copy link
Copy Markdown
Member

This should really be fixed in Proton, not here.

@Kaydax
Copy link
Copy Markdown
Contributor Author

Kaydax commented Dec 14, 2025

This should really be fixed in Proton, not here.

This is a regression with s&box itself, not Proton. There isn't an easy way to properly fix it in Proton due to how Linux is heavily case-sensitive. A better solution is to not assume case insensitivity in the code base, which I have another branch for that

@Zipdox2
Copy link
Copy Markdown

Zipdox2 commented Dec 14, 2025

This should really be fixed in Proton, not here.

It should not. Changing case sensitivity in the entirety of Proton is very extreme. I would like to ask what problem using ToLowerInvariant fixes in the first place.

@handsomematt
Copy link
Copy Markdown
Member

image

Here's when I changed it 6.5 months ago, not a few days ago when the regression started - it was done because every other bit of filesystem code normalizes to lowercase, so you would be removing it in one place only and fucking up everything it fixed before that.

I don't want to accept any fix that doesn't understand the problem fully, and doesn't understand the issues they'd cause throughout the rest of the engine.

@Kaydax Kaydax deleted the linux-patch1 branch December 15, 2025 00:02
@Kaydax
Copy link
Copy Markdown
Contributor Author

Kaydax commented Dec 15, 2025

I apologize, the mistake was on my end. The entire issue was caused by a bug with steam that caused library paths with Uppercase paths to become all lower case, thus causing the problem. The fix is to remove the library and re-add it, fixing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants