1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 15:27:20 +08:00

Move log storage location after migration complete

This commit is contained in:
Dean Herbert 2020-05-11 21:38:27 +09:00
parent 6c350db097
commit a11be07bb1
2 changed files with 7 additions and 4 deletions

View File

@ -33,10 +33,13 @@ namespace osu.Game.IO
var customStoragePath = storageConfig.Get<string>(StorageConfig.FullPath);
if (!string.IsNullOrEmpty(customStoragePath))
{
ChangeTargetStorage(host.GetStorage(customStoragePath));
Logger.Storage = UnderlyingStorage.GetStorageForDirectory("logs");
}
}
protected override void ChangeTargetStorage(Storage newStorage)
{
base.ChangeTargetStorage(newStorage);
Logger.Storage = UnderlyingStorage.GetStorageForDirectory("logs");
}
public void Migrate(string newLocation)

View File

@ -27,7 +27,7 @@ namespace osu.Game.IO
protected virtual string MutatePath(string path) => !string.IsNullOrEmpty(subPath) ? Path.Combine(subPath, path) : path;
protected void ChangeTargetStorage(Storage newStorage)
protected virtual void ChangeTargetStorage(Storage newStorage)
{
UnderlyingStorage = newStorage;
}