Parent Directory
|
Revision Log
|
Patch
--- trunk/MSBuild_CurrentVersion/Program.cs 2012/05/28 10:31:29 191 +++ trunk/MSBuild_CurrentVersion/Program.cs 2012/05/28 10:34:02 192 @@ -25,7 +25,9 @@ string version_file = "current-version.txt"; string full_path = string.Format(@"{0}\{1}", asm_path,version_file); - using (FileStream fs = new FileStream(full_path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite)) + FileInfo fi = new FileInfo(full_path); + if (fi.Exists) fi.Delete(); + using (FileStream fs = new FileStream(full_path, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.ReadWrite)) { StreamWriter sw = new StreamWriter(fs); sw.AutoFlush = true;
ViewVC Help | |
Powered by ViewVC 1.1.22 |