mirror of https://github.com/ppy/osu
Update with framework-side storage changes
This commit is contained in:
parent
3fbb2b3f42
commit
ab15b6031d
|
@ -24,12 +24,12 @@ public class OsuStorage : WrappedStorage
|
||||||
"storage.ini"
|
"storage.ini"
|
||||||
};
|
};
|
||||||
|
|
||||||
public OsuStorage(GameHost host)
|
public OsuStorage(GameHost host, Storage defaultStorage)
|
||||||
: base(host.Storage, string.Empty)
|
: base(defaultStorage, string.Empty)
|
||||||
{
|
{
|
||||||
this.host = host;
|
this.host = host;
|
||||||
|
|
||||||
storageConfig = new StorageConfigManager(host.Storage);
|
storageConfig = new StorageConfigManager(defaultStorage);
|
||||||
|
|
||||||
var customStoragePath = storageConfig.Get<string>(StorageConfig.FullPath);
|
var customStoragePath = storageConfig.Get<string>(StorageConfig.FullPath);
|
||||||
|
|
||||||
|
|
|
@ -312,11 +312,13 @@ public override void SetHost(GameHost host)
|
||||||
base.SetHost(host);
|
base.SetHost(host);
|
||||||
|
|
||||||
// may be non-null for certain tests
|
// may be non-null for certain tests
|
||||||
Storage ??= new OsuStorage(host);
|
Storage ??= host.Storage;
|
||||||
|
|
||||||
LocalConfig ??= new OsuConfigManager(Storage);
|
LocalConfig ??= new OsuConfigManager(Storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override Storage CreateStorage(GameHost host, Storage defaultStorage) => new OsuStorage(host, defaultStorage);
|
||||||
|
|
||||||
private readonly List<ICanAcceptFiles> fileImporters = new List<ICanAcceptFiles>();
|
private readonly List<ICanAcceptFiles> fileImporters = new List<ICanAcceptFiles>();
|
||||||
|
|
||||||
public async Task Import(params string[] paths)
|
public async Task Import(params string[] paths)
|
||||||
|
|
Loading…
Reference in New Issue