You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used FileIniDataParser.WriteFile to save content.Sometimes,The file contents are lost after writing.And i solved this problem by adding writer.Flush() in the StreamIniDataParser.WriteData() method.
``
The historical StreamIniDataParser.WriteData implementation only calls writer.Write(...) and does not flush the StreamWriter. FileIniDataParser.WriteFile normally flushes during disposal, but callers using WriteData directly can observe an empty or incomplete file until the writer is flushed. Adding writer.Flush() after writing would be a small, targeted fix and would preserve ownership of the writer.
Activity
MooWeii commentedon Mar 20, 2023
I hava the same issue too.
haraldrohan commentedon Sep 19, 2026
The historical
StreamIniDataParser.WriteDataimplementation only callswriter.Write(...)and does not flush theStreamWriter.FileIniDataParser.WriteFilenormally flushes during disposal, but callers usingWriteDatadirectly can observe an empty or incomplete file until the writer is flushed. Addingwriter.Flush()after writing would be a small, targeted fix and would preserve ownership of the writer.