StyleCop clean ZipFile

This commit is contained in:
Matthias Mailänder
2013-08-24 15:45:40 +02:00
parent 1c259ff919
commit 30363db0ed

View File

@@ -91,20 +91,16 @@ namespace OpenRA.FileFormats
public void Write(Dictionary<string, byte[]> contents)
{
pkg.Close();
pkg = SZipFile.Create(filename);
pkg.BeginUpdate();
// TODO: Clear existing content?
pkg.Close();
pkg = SZipFile.Create(filename);
pkg.BeginUpdate();
foreach (var kvp in contents)
pkg.Add(new StaticMemoryDataSource(kvp.Value), kvp.Key);
pkg.CommitUpdate();
pkg.Close();
pkg = new SZipFile(new MemoryStream(File.ReadAllBytes(filename)));
}
}