Don't normalize paths with test lookups

This commit is contained in:
Kenneth Skovhede
2026-02-05 17:22:01 +01:00
parent 8ec1493d55
commit 458fe8013e
+2 -2
View File
@@ -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