Permalink
Browse files

Merge pull request #1 from github/truncate-original-file

Truncate the original file before overwriting it
  • Loading branch information...
2 parents 1b3e423 + e2195e5 commit 69f1dfcbfd840c8467439c031c6a08a8a5ae5536 Paul Betts committed Mar 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Program.cs
View
@@ -98,7 +98,7 @@ public static int Main(string[] args)
static void WriteStringToFile(string path, string fileData, LineEndingType lineType)
{
- using(var of = File.OpenWrite(path))
+ using(var of = File.Open(path, FileMode.Create))
{
var buf = Encoding.UTF8.GetBytes(ForceLineEndings(fileData, lineType));
of.Write(buf, 0, buf.Length);

0 comments on commit 69f1dfc

Please sign in to comment.