path regex fix for unix systems

This commit is contained in:
Oiltanker
2022-05-26 13:23:46 +03:00
parent 7951754203
commit 6c22eea887

View File

@@ -91,7 +91,7 @@ namespace Barotrauma
public bool HasSources { get => sources.Count > 0; }
private enum SourceCategory { Shared, Server, Client };
private Regex rMaskPathValid = new Regex(@"^(((?!csharp)[^/])+/)+csharp(/(shared|client|server))?(/[^/]+)+\.cs$", RegexOptions.IgnoreCase | RegexOptions.Compiled);
private Regex rMaskPathValid = new Regex(@"^/?(((?!csharp)[^/])+/)+csharp(/(shared|client|server))?(/[^/]+)+\.cs$", RegexOptions.IgnoreCase | RegexOptions.Compiled);
private Regex rMaskPathCategory1 = new Regex(@"/(shared|client|server)(/[^/]+)+\.cs$", RegexOptions.IgnoreCase | RegexOptions.Compiled);
private Regex rMaskPathCategory2 = new Regex(@"^/(shared|client|server)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
private void RunFolder(string folder)