Skip to content

Flush modsettings stream before writing to file#1092

Open
DashingCat wants to merge 1 commit intoEverestAPI:devfrom
DashingCat:flush-modsettings-stream
Open

Flush modsettings stream before writing to file#1092
DashingCat wants to merge 1 commit intoEverestAPI:devfrom
DashingCat:flush-modsettings-stream

Conversation

@DashingCat
Copy link
Contributor

This PR flushes the StreamWriter before flushing the FileStream.

From my testing, not flushing the StreamWriter before flushing the FileStream causes data to remain in the StreamWriter, which needs to be written after the FileStream flush.

Flushing the StreamWriter before flushing the FileStream leads to one less write system calls, and may fix the issue with modsettings files being truncated/corrupted.

@maddie480-bot maddie480-bot added the 1: review needed This PR needs 2 approvals to be merged (bot-managed) label Mar 8, 2026
Copy link
Member

@microlith57 microlith57 left a comment

Choose a reason for hiding this comment

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

lgtm

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

Labels

1: review needed This PR needs 2 approvals to be merged (bot-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants