25 |
|
|
26 |
|
string version_file = "current-version.txt"; |
27 |
|
string full_path = string.Format(@"{0}\{1}", asm_path,version_file); |
28 |
< |
using (FileStream fs = new FileStream(full_path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite)) |
28 |
> |
FileInfo fi = new FileInfo(full_path); |
29 |
> |
if (fi.Exists) fi.Delete(); |
30 |
> |
using (FileStream fs = new FileStream(full_path, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.ReadWrite)) |
31 |
|
{ |
32 |
|
StreamWriter sw = new StreamWriter(fs); |
33 |
|
sw.AutoFlush = true; |