Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Apr 4, 2024
1 parent ac56542 commit 7dc99a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/StaticSettingsTests/VirtualizedRunHelperTests.cs
Expand Up @@ -109,7 +109,10 @@ public char AltDirectorySeparatorChar
}
}

public bool PathExists(string path) => exists(path);
public bool PathExists(string path) =>
exists(path) ||
exists(path.Replace('\\', '/')) ||
exists(path.Replace('/', '\\'));

// Make sure Path.Combine behaves as on Unix, even when executed on Windows
public string CombinePaths(string path1, string path2) =>
Expand Down
2 changes: 1 addition & 1 deletion src/Verify/VirtualizedRunHelper.cs
Expand Up @@ -128,7 +128,7 @@ bool TryInitializeFromBuildTimePath(string? originalCodeBaseRoot, string buildTi
var currentDir = Env.CurrentDirectory;
do
{
var testMappedPath = Env.CombinePaths(currentDir, buildTimePathRelative.Replace('\\', '/'));
var testMappedPath = Env.CombinePaths(currentDir, buildTimePathRelative);
if (Env.PathExists(testMappedPath))
{
baseRootAbsolute = buildTimePath[..^buildTimePathRelative.Length];
Expand Down

0 comments on commit 7dc99a9

Please sign in to comment.