Ensure we set ZipConstants.DefaultCodePage by using a helper method.
We were currently dealing with this terrible global variable in FileSystem/ZipFile.cs previously, but other parts of the code such as DownloadPackageLogic were creating these files too, and may not have executed the static ctors that fixed the encoding yet.
This commit is contained in:
committed by
Paul Chote
parent
1f436ad0cb
commit
297f4ad9ed
@@ -15,8 +15,7 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using ICSharpCode.SharpZipLib;
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Support;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
@@ -140,7 +139,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
try
|
||||
{
|
||||
using (var stream = File.OpenRead(file))
|
||||
using (var z = new ZipFile(stream))
|
||||
using (var z = ZipFileHelper.Create(stream))
|
||||
{
|
||||
foreach (var kv in download.Extract)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user