make migrate public abstract in base and override

This commit is contained in:
Shivam
2020-06-23 23:58:28 +02:00
parent 8b9cf6fc52
commit 8e8458ab8f
3 changed files with 8 additions and 6 deletions

View File

@ -14,7 +14,7 @@ namespace osu.Game.Tournament.IO
private readonly Storage storage;
internal readonly TournamentVideoResourceStore VideoStore;
private const string default_tournament = "default";
public TournamentStorage(Storage storage)
: base(storage.GetStorageForDirectory("tournaments"), string.Empty)
{
@ -30,7 +30,7 @@ namespace osu.Game.Tournament.IO
}
else
{
migrate();
Migrate(GetFullPath(default_tournament));
storageConfig.Set(StorageConfig.CurrentTournament, default_tournament);
storageConfig.Save();
ChangeTargetStorage(UnderlyingStorage.GetStorageForDirectory(default_tournament));
@ -40,10 +40,10 @@ namespace osu.Game.Tournament.IO
Logger.Log("Using tournament storage: " + GetFullPath(string.Empty));
}
private void migrate()
override public void Migrate(string newLocation)
{
var source = new DirectoryInfo(storage.GetFullPath("tournament"));
var destination = new DirectoryInfo(GetFullPath(default_tournament));
var destination = new DirectoryInfo(newLocation);
if (source.Exists)
{