Fix directory separators

Path.DirectorySeparatorChar is a forward slash on Linux/Unix, so it ended up preventing DECORATE and ZSCRIPT code from being loaded on Linux.
This commit is contained in:
Kevin Caccamo 2020-07-20 04:20:03 -04:00
parent 263c555bb4
commit 96208f7166
No known key found for this signature in database
GPG key ID: 483F90E1F56A8723
5 changed files with 5 additions and 5 deletions

View file

@ -231,7 +231,7 @@ namespace CodeImp.DoomBuilder.ZDoom
}
//mxd. Backward slashes are not supported
if(filename.Contains(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture)))
if(filename.Contains("\\"))
{
ReportError("Only forward slashes are supported by ZDoom");
return false;

View file

@ -805,7 +805,7 @@ namespace CodeImp.DoomBuilder.ZDoom
}
// Backward slashes are not supported
if(includelump.Contains(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture)))
if(includelump.Contains("\\"))
{
ReportError("Only forward slashes are supported by GZDoom");
return false;

View file

@ -227,7 +227,7 @@ namespace CodeImp.DoomBuilder.ZDoom
}
// Backward slashes are not supported
if(includelump.Contains(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture)))
if(includelump.Contains("\\"))
{
ReportError("Only forward slashes are supported by ZDoom");
return false;

View file

@ -114,7 +114,7 @@ namespace CodeImp.DoomBuilder.ZDoom
}
//mxd. Backward slashes are not supported
if (filename.Contains(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture)))
if (filename.Contains("\\"))
{
ReportError("Only forward slashes are supported by ZDoom");
return false;

View file

@ -273,7 +273,7 @@ namespace CodeImp.DoomBuilder.ZDoom
}
//mxd. Backward slashes are not supported
if (filename.Contains(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture)))
if (filename.Contains("\\"))
{
ReportError("Only forward slashes are supported by ZDoom");
return false;