Properly use the virtual filesystem for map loading and saving.

This commit is contained in:
Paul Chote
2016-02-08 19:12:09 +00:00
parent 6490a66ffc
commit be52c1cb72
8 changed files with 186 additions and 134 deletions

View File

@@ -27,6 +27,16 @@ namespace OpenRA.FileSystem
ZipConstants.DefaultCodePage = Encoding.UTF8.CodePage;
}
public ZipFile(FileSystem context, string filename, Stream stream, bool createOrClearContents = false)
{
Name = filename;
if (createOrClearContents)
pkg = SZipFile.Create(stream);
else
pkg = new SZipFile(stream);
}
public ZipFile(IReadOnlyFileSystem context, string filename, bool createOrClearContents = false)
{
Name = filename;