mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Move drawings.ini out of config subfolder
This commit is contained in:
parent
eec1e9ef4d
commit
08759da3a7
@ -136,7 +136,7 @@ namespace osu.Game.Tournament.Tests.NonVisual
|
||||
Assert.True(storage.Exists("drawings.txt"));
|
||||
Assert.True(storage.Exists("drawings_results.txt"));
|
||||
|
||||
Assert.True(storage.ConfigurationStorage.Exists("drawings.ini"));
|
||||
Assert.True(storage.Exists("drawings.ini"));
|
||||
|
||||
Assert.True(storage.Exists(videoFile));
|
||||
Assert.True(storage.Exists(modFile));
|
||||
|
@ -15,9 +15,7 @@ namespace osu.Game.Tournament.IO
|
||||
{
|
||||
private readonly Storage storage;
|
||||
internal readonly TournamentVideoResourceStore VideoStore;
|
||||
internal readonly Storage ConfigurationStorage;
|
||||
private const string default_tournament = "default";
|
||||
private const string config_directory = "config";
|
||||
|
||||
public TournamentStorage(Storage storage)
|
||||
: base(storage.GetStorageForDirectory("tournaments"), string.Empty)
|
||||
@ -40,8 +38,6 @@ namespace osu.Game.Tournament.IO
|
||||
ChangeTargetStorage(UnderlyingStorage.GetStorageForDirectory(default_tournament));
|
||||
}
|
||||
|
||||
ConfigurationStorage = UnderlyingStorage.GetStorageForDirectory(config_directory);
|
||||
|
||||
VideoStore = new TournamentVideoResourceStore(this);
|
||||
Logger.Log("Using tournament storage: " + GetFullPath(string.Empty));
|
||||
}
|
||||
@ -50,7 +46,6 @@ namespace osu.Game.Tournament.IO
|
||||
{
|
||||
var source = new DirectoryInfo(storage.GetFullPath("tournament"));
|
||||
var destination = new DirectoryInfo(GetFullPath(default_tournament));
|
||||
var cfgDestination = new DirectoryInfo(GetFullPath(default_tournament + Path.DirectorySeparatorChar + config_directory));
|
||||
|
||||
if (source.Exists)
|
||||
{
|
||||
@ -59,13 +54,11 @@ namespace osu.Game.Tournament.IO
|
||||
deleteRecursive(source);
|
||||
}
|
||||
|
||||
if (!cfgDestination.Exists)
|
||||
destination.CreateSubdirectory(config_directory);
|
||||
|
||||
moveFileIfExists("bracket.json", destination);
|
||||
moveFileIfExists("drawings.txt", destination);
|
||||
moveFileIfExists("drawings_results.txt", destination);
|
||||
moveFileIfExists("drawings.ini", cfgDestination);
|
||||
moveFileIfExists("drawings.ini", destination);
|
||||
}
|
||||
|
||||
private void moveFileIfExists(string file, DirectoryInfo destination)
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Tournament.Screens.Drawings
|
||||
return;
|
||||
}
|
||||
|
||||
drawingsConfig = new DrawingsConfigManager(storage.ConfigurationStorage);
|
||||
drawingsConfig = new DrawingsConfigManager(storage);
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user