Fix exception in EVORE (fixes #9)

This commit is contained in:
Matt Nadareski
2020-09-10 21:49:46 -07:00
parent 4b222003d2
commit 77d99460ab

View File

@@ -67,13 +67,19 @@ namespace BurnOutSharp
}
catch { }
Directory.CreateDirectory(Path.GetDirectoryName(tempPath));
using (BinaryWriter bw = new BinaryWriter(File.OpenWrite(tempPath)))
try
{
bw.Write(fileContent);
}
Directory.CreateDirectory(Path.GetDirectoryName(tempPath));
using (BinaryWriter bw = new BinaryWriter(File.OpenWrite(tempPath)))
{
bw.Write(fileContent);
}
return Path.GetFullPath(tempPath);
return Path.GetFullPath(tempPath);
}
catch { }
return null;
}
private static bool IsEXE(byte[] fileContent)