Fix incorrect storage being used in `CreateFileSafely` implementation

This commit is contained in:
Dean Herbert 2022-05-21 15:15:52 +09:00
parent 2f69c099cd
commit 72386d9377
1 changed files with 1 additions and 3 deletions

View File

@ -11,7 +11,7 @@ namespace osu.Game.IO
/// <summary>
/// A storage which wraps another storage and delegates implementation, potentially mutating the lookup path.
/// </summary>
public class WrappedStorage : Storage
public class WrappedStorage : NativeStorage // TODO: Revert to Storage inheritance after https://github.com/ppy/osu-framework/pull/5189
{
protected Storage UnderlyingStorage { get; private set; }
@ -67,8 +67,6 @@ public IEnumerable<string> ToLocalRelative(IEnumerable<string> paths)
public override IEnumerable<string> GetFiles(string path, string pattern = "*") =>
ToLocalRelative(UnderlyingStorage.GetFiles(MutatePath(path), pattern));
public override Stream CreateFileSafely(string path) => UnderlyingStorage.CreateFileSafely(MutatePath(path));
public override Stream GetStream(string path, FileAccess access = FileAccess.Read, FileMode mode = FileMode.OpenOrCreate) =>
UnderlyingStorage.GetStream(MutatePath(path), access, mode);