Update BeatmapArchiveReader's test

This commit is contained in:
Alex Amadori 2017-03-08 21:55:38 +01:00
parent 1acd51cc90
commit 9f40a888ec
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ public static void Register()
AddReader<OszArchiveReader>((storage, path) =>
{
using (var stream = storage.GetStream(path))
return ZipFile.IsZipFile(stream, false);
return (Path.GetExtension(path) == ".osz") && ZipFile.IsZipFile(stream, false);
});
OsuLegacyDecoder.Register();
}

View File

@ -186,7 +186,7 @@ private BeatmapSetInfo getBeatmapSet(string path)
{
hash = input.GetMd5Hash();
input.Seek(0, SeekOrigin.Begin);
path = Path.Combine(@"beatmaps", hash.Remove(1), hash.Remove(2), hash);
path = Path.Combine(@"beatmaps", hash.Remove(1), hash.Remove(2), hash+".osz");
if (!storage.Exists(path))
using (var output = storage.GetStream(path, FileAccess.Write))
input.CopyTo(output);