From 52877eca8342939b4b7fe163d0ce8f28da431b91 Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Thu, 20 Sep 2018 20:01:04 -0400 Subject: [PATCH 01/14] Update ArchiveModelManager.cs --- osu.Game/Database/ArchiveModelManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index f4f169f27c..7356ae2cc4 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -286,9 +286,10 @@ namespace osu.Game.Database using (ContextFactory.GetForWrite()) { // re-fetch the model on the import context. - var foundModel = queryModel().Include(s => s.Files).ThenInclude(f => f.FileInfo).First(s => s.ID == item.ID); + var foundModel = queryModel().Include(s => s.Files).ThenInclude(f => f.FileInfo).FirstOrDefault(s => s.ID == item.ID); - if (foundModel.DeletePending) return; + // Test for null since FirstOrDefault will return null if nothing is found + if (foundModel == null || foundModel.DeletePending) return; if (ModelStore.Delete(foundModel)) Files.Dereference(foundModel.Files.Select(f => f.FileInfo).ToArray()); From 49fbe8443a4a2003d9c97eda3eed8f996fc3a158 Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Thu, 20 Sep 2018 22:00:20 -0400 Subject: [PATCH 02/14] Test if there are beatmaps when click on delete btn --- osu.Game/Screens/Select/SongSelect.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index efdf55e477..438d4c51b7 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -537,6 +537,8 @@ namespace osu.Game.Screens.Select private void delete(BeatmapSetInfo beatmap) { if (beatmap == null) return; + // Null check because no beatmaps actually causes beatmap.Beatmaps to be null + if (!(beatmap.Beatmaps?.Any() ?? false)) return; dialogOverlay?.Push(new BeatmapDeleteDialog(beatmap)); } From 1644719893118bf97314b31235192796030c8f17 Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Thu, 20 Sep 2018 22:29:37 -0400 Subject: [PATCH 03/14] Update SongSelect.cs --- osu.Game/Screens/Select/SongSelect.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 438d4c51b7..bfac51789e 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -538,7 +538,7 @@ namespace osu.Game.Screens.Select { if (beatmap == null) return; // Null check because no beatmaps actually causes beatmap.Beatmaps to be null - if (!(beatmap.Beatmaps?.Any() ?? false)) return; + if (beatmap == null || beatmap.ID <= 0) return; dialogOverlay?.Push(new BeatmapDeleteDialog(beatmap)); } From 654345f38041b8c1f451f1d9dafba61a0b8a32fd Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Thu, 20 Sep 2018 22:32:24 -0400 Subject: [PATCH 04/14] Remove duplicate condition test --- osu.Game/Screens/Select/SongSelect.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index bfac51789e..b4dcbcce41 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -536,8 +536,6 @@ namespace osu.Game.Screens.Select private void delete(BeatmapSetInfo beatmap) { - if (beatmap == null) return; - // Null check because no beatmaps actually causes beatmap.Beatmaps to be null if (beatmap == null || beatmap.ID <= 0) return; dialogOverlay?.Push(new BeatmapDeleteDialog(beatmap)); } From eaf7697b85bbcd1bff590daf7a9cf1d83e333ef8 Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Thu, 20 Sep 2018 23:21:27 -0400 Subject: [PATCH 05/14] Add boolean return value --- osu.Game/Database/ArchiveModelManager.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 7356ae2cc4..d57b94b80a 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -281,7 +281,8 @@ namespace osu.Game.Database /// Is a no-op for already deleted items. /// /// The item to delete. - public void Delete(TModel item) + /// false if no operation was performed + public bool Delete(TModel item) { using (ContextFactory.GetForWrite()) { @@ -289,10 +290,11 @@ namespace osu.Game.Database var foundModel = queryModel().Include(s => s.Files).ThenInclude(f => f.FileInfo).FirstOrDefault(s => s.ID == item.ID); // Test for null since FirstOrDefault will return null if nothing is found - if (foundModel == null || foundModel.DeletePending) return; + if (foundModel == null || foundModel.DeletePending) return false; if (ModelStore.Delete(foundModel)) Files.Dereference(foundModel.Files.Select(f => f.FileInfo).ToArray()); + return true; } } From 6efecc4b356f612436349ccfd852af5121385123 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 23 Sep 2018 05:23:49 +0900 Subject: [PATCH 06/14] Fix files with upper-case extensions failing to import correctly --- osu.Game/IPC/ArchiveImportIPCChannel.cs | 2 +- osu.Game/OsuGameBase.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/IPC/ArchiveImportIPCChannel.cs b/osu.Game/IPC/ArchiveImportIPCChannel.cs index 6783b9712c..e127faa70d 100644 --- a/osu.Game/IPC/ArchiveImportIPCChannel.cs +++ b/osu.Game/IPC/ArchiveImportIPCChannel.cs @@ -37,7 +37,7 @@ namespace osu.Game.IPC return; } - if (importer.HandledExtensions.Contains(Path.GetExtension(path))) + if (importer.HandledExtensions.Contains(Path.GetExtension(path)?.ToLower())) importer.Import(path); } } diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 9a5dac35b9..36ca043df6 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -243,7 +243,7 @@ namespace osu.Game public void Import(params string[] paths) { - var extension = Path.GetExtension(paths.First()); + var extension = Path.GetExtension(paths.First())?.ToLower(); foreach (var importer in fileImporters) if (importer.HandledExtensions.Contains(extension)) importer.Import(paths); From 7a4367784928e123a2a5a080837c656c5d61693a Mon Sep 17 00:00:00 2001 From: Kyle Chang Date: Sat, 22 Sep 2018 22:54:38 -0400 Subject: [PATCH 07/14] Make judgements scale with cs --- osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs | 10 ++++++++-- osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs | 2 +- osu.Game/Rulesets/Judgements/DrawableJudgement.cs | 10 ++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs index 61937a535c..f2c18d4c9c 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs @@ -19,12 +19,15 @@ namespace osu.Game.Rulesets.Osu.UI private readonly Container approachCircles; private readonly JudgementContainer judgementLayer; private readonly ConnectionRenderer connectionLayer; + private readonly OsuRulesetContainer rulesetContainer; public static readonly Vector2 BASE_SIZE = new Vector2(512, 384); - public OsuPlayfield() + public OsuPlayfield(OsuRulesetContainer rulesetContainer) : base(BASE_SIZE.X) { + this.rulesetContainer = rulesetContainer; + Anchor = Anchor.Centre; Origin = Anchor.Centre; @@ -69,10 +72,13 @@ namespace osu.Game.Rulesets.Osu.UI if (!judgedObject.DisplayResult || !DisplayJudgements) return; + var explosionBaseSize = rulesetContainer.Beatmap.BeatmapInfo.BaseDifficulty.CircleSize; + DrawableOsuJudgement explosion = new DrawableOsuJudgement(result, judgedObject) { Origin = Anchor.Centre, - Position = ((OsuHitObject)judgedObject.HitObject).StackedEndPosition + Position = ((OsuHitObject)judgedObject.HitObject).StackedEndPosition, + Scale = new Vector2((1.0f - 0.7f * (explosionBaseSize - 5) / 5) / 2 * 1.65f) }; judgementLayer.Add(explosion); diff --git a/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs b/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs index 4bc6992445..6cea8a0030 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs @@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.UI public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor(this); - protected override Playfield CreatePlayfield() => new OsuPlayfield(); + protected override Playfield CreatePlayfield() => new OsuPlayfield(this); public override PassThroughInputManager CreateInputManager() => new OsuInputManager(Ruleset.RulesetInfo); diff --git a/osu.Game/Rulesets/Judgements/DrawableJudgement.cs b/osu.Game/Rulesets/Judgements/DrawableJudgement.cs index 65b2ef75c4..c2a52e5794 100644 --- a/osu.Game/Rulesets/Judgements/DrawableJudgement.cs +++ b/osu.Game/Rulesets/Judgements/DrawableJudgement.cs @@ -65,13 +65,15 @@ namespace osu.Game.Rulesets.Judgements this.FadeInFromZero(100, Easing.OutQuint); + var origScale = Scale; + switch (Result.Type) { case HitResult.None: break; case HitResult.Miss: - this.ScaleTo(1.6f); - this.ScaleTo(1, 100, Easing.In); + this.ScaleTo(origScale * 1.6f); + this.ScaleTo(origScale, 100, Easing.In); this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint); this.RotateTo(40, 800, Easing.InQuint); @@ -79,8 +81,8 @@ namespace osu.Game.Rulesets.Judgements this.Delay(600).FadeOut(200); break; default: - this.ScaleTo(0.9f); - this.ScaleTo(1, 500, Easing.OutElastic); + this.ScaleTo(origScale * 0.9f); + this.ScaleTo(origScale, 500, Easing.OutElastic); this.Delay(100).FadeOut(400); break; From 62df0ec7d4c50b58a1bbcfdb2004a2bec10584de Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Mon, 24 Sep 2018 07:16:19 -0400 Subject: [PATCH 08/14] Handle external files with File instead --- osu.Game/Rulesets/Scoring/ScoreStore.cs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/osu.Game/Rulesets/Scoring/ScoreStore.cs b/osu.Game/Rulesets/Scoring/ScoreStore.cs index 69d25fcb67..997792025e 100644 --- a/osu.Game/Rulesets/Scoring/ScoreStore.cs +++ b/osu.Game/Rulesets/Scoring/ScoreStore.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using osu.Framework.Logging; using osu.Framework.Platform; using osu.Game.Beatmaps; using osu.Game.Database; @@ -49,8 +50,24 @@ namespace osu.Game.Rulesets.Scoring public Score ReadReplayFile(string replayFilename) { - using (Stream s = storage.GetStream(Path.Combine(replay_folder, replayFilename))) - return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(s); + Stream stream; + if (File.Exists(replayFilename)) + { + // Handle replay with File since it is outside of storage + stream = File.OpenRead(replayFilename); + } + else if (storage.Exists(Path.Combine(replay_folder, replayFilename))) + { + stream = storage.GetStream(Path.Combine(replay_folder, replayFilename)); + } + else + { + Logger.Log($"Replay file {replayFilename} cannot be found", LoggingTarget.Information, LogLevel.Error); + return null; + } + + using (stream) + return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(stream); } } } From b95cc798b2b8d995422bf120118dfcb56461c44f Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Mon, 24 Sep 2018 20:56:18 -0400 Subject: [PATCH 09/14] Remove unused fallback --- osu.Game/Rulesets/Scoring/ScoreStore.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/osu.Game/Rulesets/Scoring/ScoreStore.cs b/osu.Game/Rulesets/Scoring/ScoreStore.cs index 997792025e..00aec1a28c 100644 --- a/osu.Game/Rulesets/Scoring/ScoreStore.cs +++ b/osu.Game/Rulesets/Scoring/ScoreStore.cs @@ -50,23 +50,13 @@ namespace osu.Game.Rulesets.Scoring public Score ReadReplayFile(string replayFilename) { - Stream stream; - if (File.Exists(replayFilename)) - { - // Handle replay with File since it is outside of storage - stream = File.OpenRead(replayFilename); - } - else if (storage.Exists(Path.Combine(replay_folder, replayFilename))) - { - stream = storage.GetStream(Path.Combine(replay_folder, replayFilename)); - } - else + if (!File.Exists(replayFilename)) { Logger.Log($"Replay file {replayFilename} cannot be found", LoggingTarget.Information, LogLevel.Error); return null; } - using (stream) + using (var stream = File.OpenRead(replayFilename)) return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(stream); } } From dd36b6a3815d7891418a30d07dd8f3c6329056b8 Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Mon, 24 Sep 2018 21:08:58 -0400 Subject: [PATCH 10/14] Remove unused field storage --- osu.Game/OsuGameBase.cs | 2 +- osu.Game/Rulesets/Scoring/ScoreStore.cs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 9a5dac35b9..ca989bf0d5 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -154,7 +154,7 @@ namespace osu.Game dependencies.Cache(RulesetStore = new RulesetStore(contextFactory)); dependencies.Cache(FileStore = new FileStore(contextFactory, Host.Storage)); dependencies.Cache(BeatmapManager = new BeatmapManager(Host.Storage, contextFactory, RulesetStore, api, Audio, Host)); - dependencies.Cache(ScoreStore = new ScoreStore(Host.Storage, contextFactory, Host, BeatmapManager, RulesetStore)); + dependencies.Cache(ScoreStore = new ScoreStore(contextFactory, Host, BeatmapManager, RulesetStore)); dependencies.Cache(KeyBindingStore = new KeyBindingStore(contextFactory, RulesetStore)); dependencies.Cache(SettingsStore = new SettingsStore(contextFactory)); dependencies.Cache(RulesetConfigCache = new RulesetConfigCache(SettingsStore)); diff --git a/osu.Game/Rulesets/Scoring/ScoreStore.cs b/osu.Game/Rulesets/Scoring/ScoreStore.cs index 00aec1a28c..a847438934 100644 --- a/osu.Game/Rulesets/Scoring/ScoreStore.cs +++ b/osu.Game/Rulesets/Scoring/ScoreStore.cs @@ -14,8 +14,6 @@ namespace osu.Game.Rulesets.Scoring { public class ScoreStore : DatabaseBackedStore, ICanAcceptFiles { - private readonly Storage storage; - private readonly BeatmapManager beatmaps; private readonly RulesetStore rulesets; @@ -26,9 +24,8 @@ namespace osu.Game.Rulesets.Scoring // ReSharper disable once NotAccessedField.Local (we should keep a reference to this so it is not finalised) private ScoreIPCChannel ipc; - public ScoreStore(Storage storage, DatabaseContextFactory factory, IIpcHost importHost = null, BeatmapManager beatmaps = null, RulesetStore rulesets = null) : base(factory) + public ScoreStore(DatabaseContextFactory factory, IIpcHost importHost = null, BeatmapManager beatmaps = null, RulesetStore rulesets = null) : base(factory) { - this.storage = storage; this.beatmaps = beatmaps; this.rulesets = rulesets; From 20694674345c69fb34e3566782a8aef8845e70c1 Mon Sep 17 00:00:00 2001 From: Kyle Chang Date: Mon, 24 Sep 2018 21:18:55 -0400 Subject: [PATCH 11/14] Use HitObject scale to determine judgement size --- osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs | 9 ++------- osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs index f2c18d4c9c..b0010ccbf6 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs @@ -19,15 +19,12 @@ namespace osu.Game.Rulesets.Osu.UI private readonly Container approachCircles; private readonly JudgementContainer judgementLayer; private readonly ConnectionRenderer connectionLayer; - private readonly OsuRulesetContainer rulesetContainer; public static readonly Vector2 BASE_SIZE = new Vector2(512, 384); - public OsuPlayfield(OsuRulesetContainer rulesetContainer) + public OsuPlayfield() : base(BASE_SIZE.X) { - this.rulesetContainer = rulesetContainer; - Anchor = Anchor.Centre; Origin = Anchor.Centre; @@ -72,13 +69,11 @@ namespace osu.Game.Rulesets.Osu.UI if (!judgedObject.DisplayResult || !DisplayJudgements) return; - var explosionBaseSize = rulesetContainer.Beatmap.BeatmapInfo.BaseDifficulty.CircleSize; - DrawableOsuJudgement explosion = new DrawableOsuJudgement(result, judgedObject) { Origin = Anchor.Centre, Position = ((OsuHitObject)judgedObject.HitObject).StackedEndPosition, - Scale = new Vector2((1.0f - 0.7f * (explosionBaseSize - 5) / 5) / 2 * 1.65f) + Scale = new Vector2(((OsuHitObject)judgedObject.HitObject).Scale * 1.65f) }; judgementLayer.Add(explosion); diff --git a/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs b/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs index 6cea8a0030..4bc6992445 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs @@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.UI public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor(this); - protected override Playfield CreatePlayfield() => new OsuPlayfield(this); + protected override Playfield CreatePlayfield() => new OsuPlayfield(); public override PassThroughInputManager CreateInputManager() => new OsuInputManager(Ruleset.RulesetInfo); From 319ed1bf0f3517f3e53bfefd33bf750980fcc32e Mon Sep 17 00:00:00 2001 From: Paul Teng Date: Mon, 24 Sep 2018 21:35:13 -0400 Subject: [PATCH 12/14] Reorder if statement --- osu.Game/Rulesets/Scoring/ScoreStore.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Rulesets/Scoring/ScoreStore.cs b/osu.Game/Rulesets/Scoring/ScoreStore.cs index a847438934..091cb29a71 100644 --- a/osu.Game/Rulesets/Scoring/ScoreStore.cs +++ b/osu.Game/Rulesets/Scoring/ScoreStore.cs @@ -47,14 +47,14 @@ namespace osu.Game.Rulesets.Scoring public Score ReadReplayFile(string replayFilename) { - if (!File.Exists(replayFilename)) + if (File.Exists(replayFilename)) { - Logger.Log($"Replay file {replayFilename} cannot be found", LoggingTarget.Information, LogLevel.Error); - return null; + using (var stream = File.OpenRead(replayFilename)) + return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(stream); } - using (var stream = File.OpenRead(replayFilename)) - return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(stream); + Logger.Log($"Replay file {replayFilename} cannot be found", LoggingTarget.Information, LogLevel.Error); + return null; } } } From e71e871d1fb68f3aafa7fb1c65e0ec52d7d9e50a Mon Sep 17 00:00:00 2001 From: Dan Balasescu <1329837+smoogipoo@users.noreply.github.com> Date: Wed, 26 Sep 2018 18:41:55 +0900 Subject: [PATCH 13/14] Remove unnecessary comment --- osu.Game/Database/ArchiveModelManager.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 22abb4f6fa..723bb90e7e 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -290,7 +290,6 @@ namespace osu.Game.Database // re-fetch the model on the import context. var foundModel = queryModel().Include(s => s.Files).ThenInclude(f => f.FileInfo).FirstOrDefault(s => s.ID == item.ID); - // Test for null since FirstOrDefault will return null if nothing is found if (foundModel == null || foundModel.DeletePending) return false; if (ModelStore.Delete(foundModel)) From e259911875ca54e4c8b42bb6bc8e8da34d9d6053 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 26 Sep 2018 18:44:03 +0900 Subject: [PATCH 14/14] Use invariant tolower --- osu.Game/IPC/ArchiveImportIPCChannel.cs | 2 +- osu.Game/OsuGameBase.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/IPC/ArchiveImportIPCChannel.cs b/osu.Game/IPC/ArchiveImportIPCChannel.cs index e127faa70d..fa8168c1de 100644 --- a/osu.Game/IPC/ArchiveImportIPCChannel.cs +++ b/osu.Game/IPC/ArchiveImportIPCChannel.cs @@ -37,7 +37,7 @@ namespace osu.Game.IPC return; } - if (importer.HandledExtensions.Contains(Path.GetExtension(path)?.ToLower())) + if (importer.HandledExtensions.Contains(Path.GetExtension(path)?.ToLowerInvariant())) importer.Import(path); } } diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 36ca043df6..6e34302a32 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -243,7 +243,7 @@ namespace osu.Game public void Import(params string[] paths) { - var extension = Path.GetExtension(paths.First())?.ToLower(); + var extension = Path.GetExtension(paths.First())?.ToLowerInvariant(); foreach (var importer in fileImporters) if (importer.HandledExtensions.Contains(extension)) importer.Import(paths);