Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardSmit committed May 24, 2024
1 parent fd0e5de commit 52fadd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Zio.Tests/FileSystems/TestMountFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,10 @@ public void TestDirectorySymlink()
var pathInfo = physicalFs.ConvertPathFromInternal(SystemPath).ToRelative();
var pathSource = "/physical" / pathInfo / "Source";
var filePathSource = pathSource / "test.txt";
var systemPathSource = fs.ConvertPathToInternal(pathSource);
var systemPathSource = Path.Combine(SystemPath, "Source");
var pathDest = "/physical" / pathInfo / "Dest";
var filePathDest = pathDest / "test.txt";
var systemPathDest = fs.ConvertPathToInternal(pathDest);
var systemPathDest = Path.Combine(SystemPath, "Dest");

try
{
Expand Down
1 change: 1 addition & 0 deletions src/Zio/FileSystems/FileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ public UPath ConvertPathFromInternal(string systemPath)
if (systemPath is null) throw new ArgumentNullException(nameof(systemPath));
return ValidatePath(ConvertPathFromInternalImpl(systemPath));
}

/// <summary>
/// Implementation for <see cref="ConvertPathToInternal"/>, <paramref name="innerPath"/> is guaranteed to be not null and return path to be validated through <see cref="ValidatePath"/>.
/// Converts the specified system path to a <see cref="IFileSystem"/> path.
Expand Down
13 changes: 0 additions & 13 deletions src/Zio/FileSystems/MountFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -976,19 +976,6 @@ protected override UPath ConvertPathFromDelegate(UPath path)
return path;
}

protected override string ConvertPathToInternalImpl(UPath path)
{
var mountPath = path;
var mountfs = TryGetMountOrNext(ref mountPath);

if (mountfs != null)
{
return mountfs.ConvertPathToInternal(mountPath);
}

return base.ConvertPathToInternalImpl(path);
}

private IFileSystem? TryGetMountOrNext(ref UPath path)
{
return TryGetMountOrNext(ref path, out var _);
Expand Down

0 comments on commit 52fadd5

Please sign in to comment.