mirror of
https://github.com/ppy/osu.git
synced 2025-03-12 17:07:18 +08:00
Move log storage location after migration complete
This commit is contained in:
parent
6c350db097
commit
a11be07bb1
@ -33,10 +33,13 @@ namespace osu.Game.IO
|
|||||||
var customStoragePath = storageConfig.Get<string>(StorageConfig.FullPath);
|
var customStoragePath = storageConfig.Get<string>(StorageConfig.FullPath);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(customStoragePath))
|
if (!string.IsNullOrEmpty(customStoragePath))
|
||||||
{
|
|
||||||
ChangeTargetStorage(host.GetStorage(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)
|
public void Migrate(string newLocation)
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.IO
|
|||||||
|
|
||||||
protected virtual string MutatePath(string path) => !string.IsNullOrEmpty(subPath) ? Path.Combine(subPath, path) : path;
|
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;
|
UnderlyingStorage = newStorage;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user