Merge pull request #445 from Talon1024/fix/dirsep

Fix directory separators to not use Path.DirectorySeparatorChar as a forward slash is used on Linux/Unix, so it ended up preventing DECORATE and ZSCRIPT code from being loaded on Linux.
This commit is contained in:
biwa 2020-07-20 18:14:48 +02:00 committed by GitHub
commit 73139db972
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;