Merge pull request #1289 from Damnae/legacyfilesystem_fix

Fix LegacyFilesystemReader Filenames property.
This commit is contained in:
Dean Herbert 2017-09-18 18:25:36 +09:00 committed by GitHub
commit 507261fb55
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// 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 @@ public override void Dispose()
// no-op
}
public override IEnumerable<string> Filenames => Directory.GetFiles(path, "*", SearchOption.AllDirectories).Select(Path.GetFileName).ToArray();
public override IEnumerable<string> Filenames => Directory.GetFiles(path, "*", SearchOption.AllDirectories).Select(f => FileSafety.GetRelativePath(f, path)).ToArray();
public override Stream GetUnderlyingStream() => null;
}