Fix crash on linux when saving (PR#868 by pac85)

When saving a wad for the second time some code would run that tried to
use native windows function and caused a crash.
This commit is contained in:
antonino maniscalco 2023-05-19 16:45:15 +02:00 committed by GitHub
parent a2c67a9c5e
commit b772e0665f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,7 +89,7 @@ namespace CodeImp.DoomBuilder
static public FileLockCheckResult CheckFile(string path)
{
//mxd. Do it the clunky way? (WinXP)
if(Environment.OSVersion.Version.Major < 6)
if(Environment.OSVersion.Version.Major < 6 || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
bool locked = false;