From 7d2de80e778a8b8e27fcebfd0ef31fc22efdfa1f Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 2 Apr 2022 21:36:29 -0700 Subject: [PATCH] Fix over-matching SafeLock --- BurnOutSharp/ProtectionType/SafeLock.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/BurnOutSharp/ProtectionType/SafeLock.cs b/BurnOutSharp/ProtectionType/SafeLock.cs index aae50450..c4965321 100644 --- a/BurnOutSharp/ProtectionType/SafeLock.cs +++ b/BurnOutSharp/ProtectionType/SafeLock.cs @@ -1,4 +1,5 @@ -using System.Collections.Concurrent; +using System.IO; +using System.Collections.Concurrent; using System.Collections.Generic; using BurnOutSharp.Matching; @@ -24,7 +25,7 @@ namespace BurnOutSharp.ProtectionType // Technically all need to exist but some might be renamed var matchers = new List { - new PathMatchSet(new PathMatch("SafeLock.DAT", useEndsWith: true), "SafeLock"), + new PathMatchSet(new PathMatch($"{Path.DirectorySeparatorChar}SafeLock.DAT", useEndsWith: true), "SafeLock"), new PathMatchSet(new PathMatch("SafeLock.001", useEndsWith: true), "SafeLock"), new PathMatchSet(new PathMatch("SafeLock.002", useEndsWith: true), "SafeLock"), new PathMatchSet(new PathMatch("SafeLock.128", useEndsWith: true), "SafeLock"), @@ -39,7 +40,7 @@ namespace BurnOutSharp.ProtectionType { var matchers = new List { - new PathMatchSet(new PathMatch("SafeLock.DAT", useEndsWith: true), "SafeLock"), + new PathMatchSet(new PathMatch($"{Path.DirectorySeparatorChar}SafeLock.DAT", useEndsWith: true), "SafeLock"), new PathMatchSet(new PathMatch("SafeLock.001", useEndsWith: true), "SafeLock"), new PathMatchSet(new PathMatch("SafeLock.002", useEndsWith: true), "SafeLock"), new PathMatchSet(new PathMatch("SafeLock.128", useEndsWith: true), "SafeLock"),