Add LegacyFileArchiveReader

Treats files as "archives" for import.
This commit is contained in:
smoogipoo
2018-11-28 16:13:16 +09:00
parent 5fd6e6ca77
commit a783fdb501
2 changed files with 36 additions and 0 deletions

View File

@ -486,6 +486,8 @@ namespace osu.Game.Database
return new ZipArchiveReader(File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read), Path.GetFileName(path));
if (Directory.Exists(path))
return new LegacyDirectoryArchiveReader(path);
if (File.Exists(path))
return new LegacyFileArchiveReader(path);
throw new InvalidFormatException($"{path} is not a valid archive");
}
}