From 55415d5864c65ba22dd90ea5db01bb35506607b3 Mon Sep 17 00:00:00 2001 From: duckdoom4 <60387522+duckdoom4@users.noreply.github.com> Date: Thu, 9 Feb 2023 11:00:44 +0100 Subject: [PATCH] Fix mounted FS adding the mount path instead of removing it --- pkNX.Containers/VFS/VirtualFileSystem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkNX.Containers/VFS/VirtualFileSystem.cs b/pkNX.Containers/VFS/VirtualFileSystem.cs index 60ab2193..69637a01 100644 --- a/pkNX.Containers/VFS/VirtualFileSystem.cs +++ b/pkNX.Containers/VFS/VirtualFileSystem.cs @@ -11,12 +11,12 @@ public record MountPoint public FileSystemPath MountPath { get; } public IFileSystem FileSystem { get; } - public FileSystemPath ToAbsolutePath(FileSystemPath path) + public FileSystemPath AddMountPoint(FileSystemPath path) { return MountPath.AppendPath(path); } - public FileSystemPath ToRelativePath(FileSystemPath path) + public FileSystemPath RemoveMountPoint(FileSystemPath path) { return path.IsRoot ? path : path.MakeRelativeTo(MountPath); } @@ -24,7 +24,7 @@ public FileSystemPath ToRelativePath(FileSystemPath path) public MountPoint(FileSystemPath mountPath, IFileSystem fileSystem) { MountPath = mountPath; - FileSystem = fileSystem.AsRelativeFileSystem(ToAbsolutePath, ToRelativePath); + FileSystem = fileSystem.AsRelativeFileSystem(RemoveMountPoint, AddMountPoint); } }