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
The "FileAppend*" aliases (FileAppendText and FileAppendLines), (partially) overwrite an existing file (writing starts at offset 0) instead of appending to it.
Expected Behavior
The content of an existing file is retained and additional text is appended to the end of the file
Current Behavior
The content of an existing file is (partially) overwritten.
When the content being appended is shorter than the existing content, the file's content is only partially replaced.
Possible Solution
When opening a file stream, use FileMode.Append instead of OpenOrCreate:
The "FileAppend*" aliases (FileAppendText and FileAppendLines), (partially) overwrite an existing file (writing starts at offset 0) instead of appending to it.
Expected Behavior
The content of an existing file is retained and additional text is appended to the end of the file
Current Behavior
The content of an existing file is (partially) overwritten.
When the content being appended is shorter than the existing content, the file's content is only partially replaced.
Possible Solution
When opening a file stream, use
FileMode.Append
instead ofOpenOrCreate
:Cake.FileHelpers/src/Cake.FileHelpers/FileHelpers.cs
Line 138 in 8e78cde
Your Environment
The text was updated successfully, but these errors were encountered: