mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:07:52 +08:00
Fix storage wrapping logic setting logger too early in startup sequence
This commit is contained in:
parent
dbfeea9880
commit
f3b68a4fbf
@ -102,8 +102,15 @@ namespace osu.Game.IO
|
||||
|
||||
protected override void ChangeTargetStorage(Storage newStorage)
|
||||
{
|
||||
var lastStorage = UnderlyingStorage;
|
||||
base.ChangeTargetStorage(newStorage);
|
||||
Logger.Storage = UnderlyingStorage.GetStorageForDirectory("logs");
|
||||
|
||||
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