Skip to content

Commit

Permalink
Fix filemode
Browse files Browse the repository at this point in the history
  • Loading branch information
Windmill-City committed Sep 22, 2020
1 parent 7239630 commit bc9ce6a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Patcher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static void ExtractDlls(string path)

private static void WriteDll(byte[] dlldata, string path)
{
var file = new FileStream(path, FileMode.OpenOrCreate | FileMode.Truncate, FileAccess.ReadWrite);
var file = new FileStream(path, FileMode.Create, FileAccess.ReadWrite);
file.Write(dlldata, 0, dlldata.Length);
file.Flush();
file.Close();
Expand Down
4 changes: 2 additions & 2 deletions Patcher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.4")]
[assembly: AssemblyFileVersion("1.0.4")]
[assembly: AssemblyVersion("1.0.5")]
[assembly: AssemblyFileVersion("1.0.5")]
2 changes: 1 addition & 1 deletion Patcher/StreamHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void WriteFile(Stream stream, string path)
stream.Seek(0, SeekOrigin.Begin);
stream.Read(bytes, 0, bytes.Length);
FileStream fileStream = new FileStream(path,
FileMode.OpenOrCreate | FileMode.Truncate,
FileMode.Create,
FileAccess.ReadWrite);
fileStream.Write(bytes, 0, bytes.Length);
fileStream.Flush();
Expand Down

0 comments on commit bc9ce6a

Please sign in to comment.