mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Fix storage wrapping logic setting logger too early in startup sequence
This commit is contained in:
parent
9f7c6adb58
commit
df4bd86cfc
@ -102,9 +102,16 @@ namespace osu.Game.IO
|
||||
|
||||
protected override void ChangeTargetStorage(Storage newStorage)
|
||||
{
|
||||
var lastStorage = UnderlyingStorage;
|
||||
base.ChangeTargetStorage(newStorage);
|
||||
|
||||
if (lastStorage != null)
|
||||
{
|
||||
// for now we assume that if there was a previous storage, this is a migration operation.
|
||||
// the logger shouldn't be set during initialisation as it can cause cross-talk in tests (due to being static).
|
||||
Logger.Storage = UnderlyingStorage.GetStorageForDirectory("logs");
|
||||
}
|
||||
}
|
||||
|
||||
public override void Migrate(Storage newStorage)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user