fixes issue with detecting fileswaps
This commit is contained in:
@@ -22,7 +22,7 @@ public partial class FileReplacement
|
|||||||
public bool HasFileReplacement => GamePaths.Count >= 1 && GamePaths.Any(p => !string.Equals(p, ResolvedPath, StringComparison.Ordinal));
|
public bool HasFileReplacement => GamePaths.Count >= 1 && GamePaths.Any(p => !string.Equals(p, ResolvedPath, StringComparison.Ordinal));
|
||||||
|
|
||||||
public string Hash => _hashLazy.Value;
|
public string Hash => _hashLazy.Value;
|
||||||
public bool IsFileSwap => !LocalPathRegex().IsMatch(ResolvedPath) && !string.Equals(GamePaths.First(), ResolvedPath, StringComparison.Ordinal);
|
public bool IsFileSwap => !LocalPathRegex().IsMatch(ResolvedPath) && GamePaths.All(p => !LocalPathRegex().IsMatch(p));
|
||||||
public string ResolvedPath { get; init; }
|
public string ResolvedPath { get; init; }
|
||||||
|
|
||||||
public FileReplacementData ToFileReplacementDto()
|
public FileReplacementData ToFileReplacementDto()
|
||||||
@@ -37,7 +37,7 @@ public partial class FileReplacement
|
|||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"Modded: {HasFileReplacement} - {string.Join(",", GamePaths)} => {ResolvedPath}";
|
return $"HasReplacement:{HasFileReplacement},IsFileSwap:{IsFileSwap} - {string.Join(",", GamePaths)} => {ResolvedPath}";
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedRegex(@"^[a-zA-Z]:(/|\\)", RegexOptions.ECMAScript)]
|
[GeneratedRegex(@"^[a-zA-Z]:(/|\\)", RegexOptions.ECMAScript)]
|
||||||
|
|||||||
Reference in New Issue
Block a user