1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Standardise path

This commit is contained in:
Dean Herbert 2018-06-06 20:55:42 +09:00
parent 3b03a25ea5
commit c756a89daf

View File

@ -17,14 +17,14 @@ namespace osu.Game.IO.Archives
public LegacyFilesystemReader(string path)
: base(Path.GetFileName(path))
{
this.path = path;
// re-get full path to standardise with Directory.GetFiles return values below.
this.path = Path.GetFullPath(path);
}
public override Stream GetStream(string name) => File.OpenRead(Path.Combine(path, name));
public override void Dispose()
{
// no-op
}
public override IEnumerable<string> Filenames => Directory.GetFiles(path, "*", SearchOption.AllDirectories).Select(f => f.Replace(path, string.Empty).Trim(Path.DirectorySeparatorChar)).ToArray();