From 458fe8013e73ba1bf312ea0be2370eae81f6bbd5 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Thu, 5 Feb 2026 17:22:01 +0100 Subject: [PATCH] Don't normalize paths with test lookups --- Duplicati/UnitTest/DuplicatePathTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/UnitTest/DuplicatePathTests.cs b/Duplicati/UnitTest/DuplicatePathTests.cs index 43c859f00..e2aebddde 100644 --- a/Duplicati/UnitTest/DuplicatePathTests.cs +++ b/Duplicati/UnitTest/DuplicatePathTests.cs @@ -76,7 +76,6 @@ namespace Duplicati.UnitTest // Use Path.Combine for cross-platform path handling var searchPath = Path.Combine(DATAFOLDER, "duplicate.txt"); // Normalize path separators for the database query - searchPath = searchPath.Replace(Path.DirectorySeparatorChar, '/'); cmd.CommandText = @" SELECT ""ID"" FROM ""File"" WHERE ""Path"" = @Path @@ -292,7 +291,8 @@ namespace Duplicati.UnitTest // Use Path.Combine for cross-platform path handling var searchPath = Path.Combine(DATAFOLDER, "test.txt"); // Normalize path separators for the database query - searchPath = searchPath.Replace(Path.DirectorySeparatorChar, '/'); + // Need to replace both types of separators to handle cross-platform paths + searchPath = searchPath.Replace('\\', '/'); cmd.CommandText = @" SELECT ""ID"" FROM ""File"" WHERE ""Path"" = @Path