From 5e0b89a1a862c20a938dc3b7d1e63be87e717ff9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 18 Aug 2023 17:56:43 +0900 Subject: [PATCH] Rename `GetPath` to `GetFullPath` to better match expectations --- osu.Game/Beatmaps/BeatmapImporter.cs | 4 ++-- osu.Game/IO/Archives/LegacyDirectoryArchiveReader.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapImporter.cs b/osu.Game/Beatmaps/BeatmapImporter.cs index 7e82516bed..14719da1bc 100644 --- a/osu.Game/Beatmaps/BeatmapImporter.cs +++ b/osu.Game/Beatmaps/BeatmapImporter.cs @@ -323,11 +323,11 @@ private DateTimeOffset getDateAdded(ArchiveReader? reader) { var beatmaps = reader.Filenames.Where(f => f.EndsWith(".osu", StringComparison.OrdinalIgnoreCase)); - dateAdded = File.GetLastWriteTimeUtc(legacyReader.GetPath(beatmaps.First())); + dateAdded = File.GetLastWriteTimeUtc(legacyReader.GetFullPath(beatmaps.First())); foreach (string beatmapName in beatmaps) { - var currentDateAdded = File.GetLastWriteTimeUtc(legacyReader.GetPath(beatmapName)); + var currentDateAdded = File.GetLastWriteTimeUtc(legacyReader.GetFullPath(beatmapName)); if (currentDateAdded < dateAdded) dateAdded = currentDateAdded; diff --git a/osu.Game/IO/Archives/LegacyDirectoryArchiveReader.cs b/osu.Game/IO/Archives/LegacyDirectoryArchiveReader.cs index 8a576e33d8..1503705022 100644 --- a/osu.Game/IO/Archives/LegacyDirectoryArchiveReader.cs +++ b/osu.Game/IO/Archives/LegacyDirectoryArchiveReader.cs @@ -21,9 +21,9 @@ public LegacyDirectoryArchiveReader(string path) this.path = Path.GetFullPath(path); } - public override Stream GetStream(string name) => File.OpenRead(GetPath(name)); + public override Stream GetStream(string name) => File.OpenRead(GetFullPath(name)); - public string GetPath(string name) => Path.Combine(path, name); + public string GetFullPath(string filename) => Path.Combine(path, filename); public override void Dispose() {