Skip to content

Commit

Permalink
Fix possible cause of null bytes in config file
Browse files Browse the repository at this point in the history
Relates to: #471
  • Loading branch information
canton7 committed Jan 21, 2019
1 parent 17436ea commit 814cafb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SyncTrayzor/Utils/AtomicFileStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ private static string TempFilePath(string path)
return path + DefaultTempFileSuffix;
}

public override void Close()
protected override void Dispose(bool disposing)
{
base.Close();
base.Dispose(disposing);

bool success = NativeMethods.MoveFileEx(this.tempPath, this.path, MoveFileFlags.ReplaceExisting | MoveFileFlags.WriteThrough);
if (!success)
Expand Down

0 comments on commit 814cafb

Please sign in to comment.