mirror of
https://github.com/ppy/osu
synced 2025-02-09 14:47:33 +00:00
Add comment about migration code
This commit is contained in:
parent
f218a32e5f
commit
7ed862edd7
@ -36,6 +36,10 @@ namespace osu.Game.Tournament.IO
|
|||||||
|
|
||||||
public override void Migrate(Storage newStorage)
|
public override void Migrate(Storage newStorage)
|
||||||
{
|
{
|
||||||
|
// this migration only happens once on moving to the per-tournament storage system.
|
||||||
|
// listed files are those known at that point in time.
|
||||||
|
// this can be removed at some point in the future (6 months obsoletion would mean 2021-04-19)
|
||||||
|
|
||||||
var source = new DirectoryInfo(storage.GetFullPath("tournament"));
|
var source = new DirectoryInfo(storage.GetFullPath("tournament"));
|
||||||
var destination = new DirectoryInfo(newStorage.GetFullPath("."));
|
var destination = new DirectoryInfo(newStorage.GetFullPath("."));
|
||||||
|
|
||||||
@ -50,6 +54,7 @@ namespace osu.Game.Tournament.IO
|
|||||||
moveFileIfExists("drawings.txt", destination);
|
moveFileIfExists("drawings.txt", destination);
|
||||||
moveFileIfExists("drawings_results.txt", destination);
|
moveFileIfExists("drawings_results.txt", destination);
|
||||||
moveFileIfExists("drawings.ini", destination);
|
moveFileIfExists("drawings.ini", destination);
|
||||||
|
|
||||||
ChangeTargetStorage(newStorage);
|
ChangeTargetStorage(newStorage);
|
||||||
storageConfig.Set(StorageConfig.CurrentTournament, default_tournament);
|
storageConfig.Set(StorageConfig.CurrentTournament, default_tournament);
|
||||||
storageConfig.Save();
|
storageConfig.Save();
|
||||||
|
Loading…
Reference in New Issue
Block a user