Skip to content

Commit 4243fdb

Browse files
committed
Fix cross filesystem copy / ResolvePath for AggregateFileSystem
1 parent 456f9d9 commit 4243fdb

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/Zio/FileSystems/AggregateFileSystem.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Alexandre Mutel. All rights reserved.
1+
// Copyright (c) Alexandre Mutel. All rights reserved.
22
// This file is licensed under the BSD-Clause 2 license.
33
// See the license.txt file in the project root for more information.
44

@@ -278,7 +278,20 @@ protected override Stream OpenFileImpl(UPath path, FileMode mode, FileAccess acc
278278
var entry = GetFile(path);
279279
return entry.FileSystem.OpenFile(path, mode, access, share);
280280
}
281+
282+
/// <inheritdoc />
283+
protected override (IFileSystem FileSystem, UPath Path) ResolvePathImpl(UPath path)
284+
{
285+
var fsPath = TryGetFile(path);
286+
287+
if (!fsPath.HasValue)
288+
{
289+
return base.ResolvePathImpl(path);
290+
}
281291

292+
return (fsPath.Value.FileSystem, fsPath.Value.Path);
293+
}
294+
282295
// ----------------------------------------------
283296
// Metadata API
284297
// ----------------------------------------------

0 commit comments

Comments
 (0)