mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 19:47:21 +01:00
fixes issue with detecting fileswaps
This commit is contained in:
parent
f17c1b7dd8
commit
a206d7c0cc
1 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ public partial class FileReplacement
|
|||
public bool HasFileReplacement => GamePaths.Count >= 1 && GamePaths.Any(p => !string.Equals(p, ResolvedPath, StringComparison.Ordinal));
|
||||
|
||||
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 FileReplacementData ToFileReplacementDto()
|
||||
|
|
@ -37,7 +37,7 @@ public partial class FileReplacement
|
|||
|
||||
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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue