From 5a76ed4000075aecd01fa0c3583709d6d34f811c Mon Sep 17 00:00:00 2001 From: Damnae Date: Mon, 18 Sep 2017 10:14:29 +0200 Subject: [PATCH] Fix LegacyFilesystemReader Filenames property. --- osu.Game/Beatmaps/IO/LegacyFilesystemReader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/IO/LegacyFilesystemReader.cs b/osu.Game/Beatmaps/IO/LegacyFilesystemReader.cs index 21042ad8bd..79a47c8724 100644 --- a/osu.Game/Beatmaps/IO/LegacyFilesystemReader.cs +++ b/osu.Game/Beatmaps/IO/LegacyFilesystemReader.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework.IO.File; using System.Collections.Generic; using System.IO; using System.Linq; @@ -26,7 +27,7 @@ namespace osu.Game.Beatmaps.IO // no-op } - public override IEnumerable Filenames => Directory.GetFiles(path, "*", SearchOption.AllDirectories).Select(Path.GetFileName).ToArray(); + public override IEnumerable Filenames => Directory.GetFiles(path, "*", SearchOption.AllDirectories).Select(f => FileSafety.GetRelativePath(f, path)).ToArray(); public override Stream GetUnderlyingStream() => null; }