mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Address remaining reviews suggestions.
This commit is contained in:
@ -64,7 +64,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
protected override string[] HashableFileTypes => new[] { ".osu" };
|
protected override string[] HashableFileTypes => new[] { ".osu" };
|
||||||
|
|
||||||
protected override bool CheckStableDirectoryExists(StableStorage stableStorage) => stableStorage.GetSongStorage().ExistsDirectory(".");
|
protected override bool StableDirectoryExists(StableStorage stableStorage) => stableStorage.GetSongStorage().ExistsDirectory(".");
|
||||||
|
|
||||||
protected override IEnumerable<string> GetStableImportPaths(StableStorage stableStorage)
|
protected override IEnumerable<string> GetStableImportPaths(StableStorage stableStorage)
|
||||||
{
|
{
|
||||||
|
@ -640,10 +640,10 @@ namespace osu.Game.Database
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks for the existence of an osu-stable directory.
|
/// Checks for the existence of an osu-stable directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual bool CheckStableDirectoryExists(StableStorage stableStorage) => stableStorage.ExistsDirectory(ImportFromStablePath);
|
protected virtual bool StableDirectoryExists(StableStorage stableStorage) => stableStorage.ExistsDirectory(ImportFromStablePath);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Select paths to import from stable. Default implementation iterates all directories in <see cref="ImportFromStablePath"/>.
|
/// Select paths to import from stable where all paths should be absolute. Default implementation iterates all directories in <see cref="ImportFromStablePath"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual IEnumerable<string> GetStableImportPaths(StableStorage stableStorage) => stableStorage.GetDirectories(ImportFromStablePath)
|
protected virtual IEnumerable<string> GetStableImportPaths(StableStorage stableStorage) => stableStorage.GetDirectories(ImportFromStablePath)
|
||||||
.Select(path => stableStorage.GetFullPath(path));
|
.Select(path => stableStorage.GetFullPath(path));
|
||||||
@ -668,7 +668,7 @@ namespace osu.Game.Database
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CheckStableDirectoryExists(stable))
|
if (!StableDirectoryExists(stable))
|
||||||
{
|
{
|
||||||
// This handles situations like when the user does not have a Skins folder
|
// This handles situations like when the user does not have a Skins folder
|
||||||
Logger.Log($"No {ImportFromStablePath} folder available in osu!stable installation", LoggingTarget.Information, LogLevel.Error);
|
Logger.Log($"No {ImportFromStablePath} folder available in osu!stable installation", LoggingTarget.Information, LogLevel.Error);
|
||||||
|
@ -35,12 +35,13 @@ namespace osu.Game.IO
|
|||||||
{
|
{
|
||||||
var songsDirectoryPath = Path.Combine(BasePath, stable_default_songs_path);
|
var songsDirectoryPath = Path.Combine(BasePath, stable_default_songs_path);
|
||||||
|
|
||||||
var configFile = GetFiles(".", "osu!.*.cfg").FirstOrDefault();
|
var configFile = GetFiles(".", "osu!.*.cfg").SingleOrDefault();
|
||||||
|
|
||||||
if (configFile == null)
|
if (configFile == null)
|
||||||
return songsDirectoryPath;
|
return songsDirectoryPath;
|
||||||
|
|
||||||
using (var textReader = new StreamReader(GetStream(configFile)))
|
using (var stream = GetStream(configFile))
|
||||||
|
using (var textReader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
string line;
|
string line;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user