Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<ItemGroup>
<!-- Fix MSB3822: required at runtime for non-string resources -->
<PackageReference Include="System.Resources.Extensions" Version="9.0.0" />
<PackageReference Include="System.Resources.Extensions" Version="10.0.8" />
</ItemGroup>

<Target Name="CopyLicenseAndReadme" AfterTargets="Build">
Expand Down
4 changes: 2 additions & 2 deletions src/KKManager.Core/Data/Sardines/SardineModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static SardineModInfo LoadFromFile(string filename)
var version = name.Substring(versionSepIdx + 1);


using (var zf = ZipArchive.Open(location))
using (var zf = ZipArchive.OpenArchive(location))
{
// Without this reading crashes if any entry name has invalid characters
// TODO not available in sharplib - zf.IgnoreDuplicateFiles = true;
Expand Down Expand Up @@ -174,7 +174,7 @@ public static SardineModInfo LoadFromFile(string filename)
{
try
{
using (var zf2 = ZipArchive.Open(location))
using (var zf2 = ZipArchive.OpenArchive(location))
{
var if2 = zf2.Entries.First(x => x.Key == imgName);
using (var archiveStream = if2.OpenEntryStream())
Expand Down
4 changes: 2 additions & 2 deletions src/KKManager.Core/Data/Zipmods/SideloaderModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static SideloaderModInfo LoadFromFile(string filename)
if (!IsValidZipmodExtension(location.Extension))
throw new ArgumentException($"The file {filename} has an invalid extension and can't be a zipmod", nameof(filename));

using (var zf = ZipArchive.Open(location))
using (var zf = ZipArchive.OpenArchive(location))
{
// Without this reading crashes if any entry name has invalid characters
// TODO not available in sharplib - zf.IgnoreDuplicateFiles = true;
Expand Down Expand Up @@ -170,7 +170,7 @@ public static SideloaderModInfo LoadFromFile(string filename)
{
try
{
using (var zf2 = ZipArchive.Open(location))
using (var zf2 = ZipArchive.OpenArchive(location))
{
var if2 = zf2.Entries.First(x => x.Key == imgName);
using (var archiveStream = if2.OpenEntryStream())
Expand Down
2 changes: 1 addition & 1 deletion src/KKManager.Core/KKManager.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="NetSettingBinder" Version="1.1.6062.19744" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="ObjectListView.Official" Version="2.9.1" />
<PackageReference Include="SharpCompress" Version="0.42.1" />
<PackageReference Include="SharpCompress" Version="0.48.1" />
<PackageReference Include="System.Reactive.Windows.Forms" Version="6.1.0" />
<PackageReference Include="NBug" Version="1.2.2" />
<PackageReference Include="Windows7APICodePack-Shell" Version="1.1.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/KKManager.SB3UGS/SB3UGS_Initializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private static void Initialize()
{
Console.WriteLine("Found " + target.Name + " - attempting to extract");

using (var extr = ArchiveFactory.Open(target))
using (var extr = ArchiveFactory.OpenArchive(target))
{
if (!extr.IsComplete)
throw new IOException("Archive " + target.Name + " is not valid or is corrupted");
Expand Down
2 changes: 1 addition & 1 deletion src/KKManager.Updater/KKManager.Updater.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ProjectReference Include="..\PortableSettingsProvider\PortableSettingsProvider.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="4.0.18.2" />
<PackageReference Include="AWSSDK.S3" Version="4.0.23.3" />
<PackageReference Include="FluentFTP" Version="[*,35.1.0]" />
<PackageReference Include="MegaApiClient" Version="1.10.5" />
<PackageReference Include="MonoTorrent" Version="3.0.2" />
Expand Down
2 changes: 1 addition & 1 deletion src/KKManager.Updater/Sources/ZipUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class ZipUpdater : UpdateSourceBase

public ZipUpdater(FileInfo archive, int discoveryPriority, int downloadPriority = 101) : base(archive.Name, discoveryPriority, downloadPriority)
{
_archive = ArchiveFactory.Open(archive);
_archive = ArchiveFactory.OpenArchive(archive);
}
public override void Dispose()
{
Expand Down
11 changes: 5 additions & 6 deletions src/KKManager/ModpackTool/Data/ZipmodProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static async Task ProcessingThread()
}

// ------ Extract zipmod to temp
using (var zf = ArchiveFactory.Open(zipmodEntry.FullPath.FullName))
using (var zf = ArchiveFactory.OpenArchive(zipmodEntry.FullPath.FullName))
{
zf.ExtractArchiveToDirectory(tempDir);
}
Expand Down Expand Up @@ -135,18 +135,17 @@ private static async Task ProcessingThread()
manifestWorkCopy.Save(writer, SaveOptions.OmitDuplicateNamespaces);

// ------ Recompress the archive
using (var zf = ZipArchive.Create())
using (var zf = ZipArchive.CreateArchive())
using (var fs = File.Create(outPath))
{
zf.DeflateCompressionLevel = CompressionLevel.None;
zf.AddAllFromDirectory(tempDir);
zf.SaveTo(fs, new ZipWriterOptions(CompressionType.Deflate)
zf.SaveTo(fs, new ZipWriterOptions(CompressionType.Deflate, CompressionLevel.None)
{
ArchiveComment = archiveComment,
ArchiveEncoding = new ArchiveEncoding(Encoding.UTF8, Encoding.UTF8),
ArchiveEncoding = new ArchiveEncoding { Default = Encoding.UTF8, Password = Encoding.UTF8 },
// Seems like there's soem funny business going on (getting zip version 63 instead of 20) and setting both of these again seems to fix it???
CompressionType = CompressionType.Deflate,
DeflateCompressionLevel = CompressionLevel.None,
CompressionLevel = (int)CompressionLevel.None,
Comment thread
ManlyMarco marked this conversation as resolved.
UseZip64 = false,
LeaveStreamOpen = false
});
Expand Down
4 changes: 2 additions & 2 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ProjectReference Include="..\KKManager.Core\KKManager.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MSTest.TestAdapter" Version="4.1.0" />
<PackageReference Include="NuGet.Frameworks" Version="7.0.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.2.3" />
<PackageReference Include="NuGet.Frameworks" Version="7.6.0" />
</ItemGroup>
</Project>
Loading