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

Avoid write mode when opening save files #7694

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

StephenCWills
Copy link
Member

It seems that MinGW doesn't support opening files in exclusive mode. I'm hoping it supports append mode, at least.
https://sourceforge.net/p/mingw-w64/bugs/493/

The main difference here is that the game client will have to run GetFileSize() on newly created files and also open the file twice. The difference should be negligible, especially considering that the vast majority of MpqWriter instances will be opening existing files.

This resolves #7693

@StephenCWills
Copy link
Member Author

Confirmed, this PR fixes #7693 on my laptop (Windows 10).

@AJenbo AJenbo merged commit a4f38d5 into diasurgical:master Feb 2, 2025
23 checks passed
@StephenCWills StephenCWills deleted the fopen-no-exclusive-mode branch February 2, 2025 02:42
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.

[Issue Report]: Can't create new character because of #7674
2 participants