Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #208 from squid-box/dev
Browse files Browse the repository at this point in the history
Release 1.6.2
  • Loading branch information
squid-box authored Apr 9, 2024
2 parents a49c04b + 4078960 commit cf6377d
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
branches: [ "master" ]

env:
VERSION: '1.6.1.${{ github.run_number }}'
VERSION: '1.6.2.${{ github.run_number }}'

jobs:
build:
Expand Down
Binary file modified SevenZip/7z.dll
Binary file not shown.
Binary file modified SevenZip/7z64.dll
Binary file not shown.
1 change: 1 addition & 0 deletions SevenZip/ArchiveOpenCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public int GetStream(string name, out IInStream inStream)
_volumeFileNames.Add(name);
if (_wrappers.ContainsKey(name))
{
_wrappers[name].Seek(0, SeekOrigin.Begin, IntPtr.Zero);
inStream = _wrappers[name];
}
else
Expand Down
19 changes: 16 additions & 3 deletions SevenZip/Formats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,12 @@ public enum InArchiveFormat
/// Mach-O file format.
/// </summary>
/// <remarks><a href="https://en.wikipedia.org/wiki/Mach-O">Wikipedia information</a></remarks>
MachO
MachO,
/// <summary>
/// Apple File System Format.
/// </summary>
/// <remarks><a href="https://en.wikipedia.org/wiki/Apple_File_System">Wikipedia information</a></remarks>
Apfs
}

/// <summary>
Expand Down Expand Up @@ -270,6 +275,11 @@ public enum OutArchiveFormat
/// <remarks><a href="http://en.wikipedia.org/wiki/Bzip2">Wikipedia information</a></remarks>
BZip2,
/// <summary>
/// Microsoft Windows Imaging disk image format.
/// </summary>
/// <remarks><a href="http://en.wikipedia.org/wiki/Windows_Imaging_Format">Wikipedia information</a></remarks>
Wim,
/// <summary>
/// Open Tar archive format.
/// </summary>
/// <remarks><a href="http://en.wikipedia.org/wiki/Tar_(file_format)">Wikipedia information</a></remarks>
Expand Down Expand Up @@ -425,7 +435,8 @@ internal static int GetMaxValue(Type type)
{InArchiveFormat.Ntfs, new Guid("23170f69-40c1-278a-1000-000110D90000")},
{InArchiveFormat.Fat, new Guid("23170f69-40c1-278a-1000-000110DA0000")},
{InArchiveFormat.Mbr, new Guid("23170f69-40c1-278a-1000-000110DB0000")},
{InArchiveFormat.MachO, new Guid("23170f69-40c1-278a-1000-000110DF0000")}
{InArchiveFormat.MachO, new Guid("23170f69-40c1-278a-1000-000110DF0000")},
{InArchiveFormat.Apfs, new Guid("23170f69-40c1-278a-1000-000110C30000")}
};

#endregion
Expand All @@ -441,9 +452,10 @@ internal static int GetMaxValue(Type type)
{OutArchiveFormat.SevenZip, new Guid("23170f69-40c1-278a-1000-000110070000")},
{OutArchiveFormat.Zip, new Guid("23170f69-40c1-278a-1000-000110010000")},
{OutArchiveFormat.BZip2, new Guid("23170f69-40c1-278a-1000-000110020000")},
{OutArchiveFormat.Wim, new Guid("23170f69-40c1-278a-1000-000110E60000")},
{OutArchiveFormat.GZip, new Guid("23170f69-40c1-278a-1000-000110ef0000")},
{OutArchiveFormat.Tar, new Guid("23170f69-40c1-278a-1000-000110ee0000")},
{OutArchiveFormat.XZ, new Guid("23170f69-40c1-278a-1000-0001100C0000")},
{OutArchiveFormat.XZ, new Guid("23170f69-40c1-278a-1000-0001100C0000")}
};

#endregion
Expand Down Expand Up @@ -472,6 +484,7 @@ internal static int GetMaxValue(Type type)
{OutArchiveFormat.SevenZip, InArchiveFormat.SevenZip},
{OutArchiveFormat.GZip, InArchiveFormat.GZip},
{OutArchiveFormat.BZip2, InArchiveFormat.BZip2},
{OutArchiveFormat.Wim, InArchiveFormat.Wim},
{OutArchiveFormat.Tar, InArchiveFormat.Tar},
{OutArchiveFormat.XZ, InArchiveFormat.XZ},
{OutArchiveFormat.Zip, InArchiveFormat.Zip}
Expand Down
9 changes: 5 additions & 4 deletions SevenZip/SevenZipBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,21 @@ internal void CheckedExecute(int hresult, string message, CallbackBase handler)
case -2146233086:
exception = new SevenZipException("Argument is out of range. (0x80131502: E_ARGUMENTOUTOFRANGE)");
break;
case -2147024690:
exception = new SevenZipException("Filename or extension is too long. (0x800700CE: ERROR_FILENAME_EXCED_RANGE)");
break;
default:
exception = new SevenZipException(
$"Execution has failed due to an internal SevenZipSharp issue (0x{hresult:x} / {hresult}).\n" +
"Please report it to https://github.com/squid-box/SevenZipSharp/issues/, include the release number, 7z version used, and attach the archive.");
"You might find more info at https://github.com/squid-box/SevenZipSharp/issues/, but this library is no longer actively supported.");
break;
}

ThrowException(handler, exception);
}
else
{
ThrowException(handler,
new SevenZipException(message + hresult.ToString(CultureInfo.InvariantCulture) +
'.'));
ThrowException(handler, new SevenZipException(message + hresult.ToString(CultureInfo.InvariantCulture) + '.'));
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion SevenZip/SevenZipExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ private IInStream GetArchiveStream(bool dispose)
/// <returns>OperationResult.Ok if Open() succeeds.</returns>
private OperationResult OpenArchiveInner(IInStream archiveStream, IArchiveOpenCallback openCallback)
{
ulong checkPos = 1 << 15;
ulong checkPos = 1 << 23;
var res = _archive.Open(archiveStream, ref checkPos, openCallback);

return (OperationResult)res;
Expand Down
19 changes: 19 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 1.6.2 (2024-04-10)
- Ensuring streams provided are at the beginning of the file, thanks to GitHub user fgimian.
- Fixed an issues where SFX archives would not be correctly detected, thanks to GitHub user fgimian.
- Added support for APFS format, thanks to GitHub user elihwyma.
- Added support for Wim format, thanks to GitHub user pysj.

## 1.6.1 (2023-04-04)
- Fixed broken asynchronous extraction.

## 1.6.0 (2023-03-31)
- Added option to leave streams open after extraction, thanks to GitHub user acrilly-msft.
- Added support for GPT and NTFS formats, thanks to GitHub user acrilly-msft.
- Added support for the CPIO format, thanks to GitHub user doug24.
- Changed how the Unique ID's are generated, thanks to GitHub user RoadTrain.
- Fixed an issue with multi-volume archives of more than 1000 parts, thanks to GitHub user in1gma.
- Fixed an issue when extracting from a read-only file, thanks to GitHub user benjicoh.
- Fixed an issue with appending to archives with encrypted headers, thanks to GitHub user amarendrabiorad.
- Fixed an issue when appending to encrypted archives, using streams.

## 1.5.2 (2023-03-22)
- Fixed an issue when seeking in streams with SeekOrigin.End, thanks to GitHub user bneidhold.
- Fixed an issue when checking multi-volume 7z archives, thanks to GitHub user panda73111.
Expand Down
7 changes: 6 additions & 1 deletion package.lite.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
<license type="expression">LGPL-3.0-only</license>
<projectUrl>https://github.com/squid-box/SevenZipSharp</projectUrl>
<tags>7z sevenzip sevenzipsharp 7-zip</tags>
<releaseNotes>Fixed broken asynchronous extraction.</releaseNotes>
<releaseNotes>
Ensuring streams provided are at the beginning of the file, thanks to GitHub user fgimian.
Fixed an issues where SFX archives would not be correctly detected, thanks to GitHub user fgimian.
Added support for APFS format, thanks to GitHub user elihwyma.
Added support for Wim format, thanks to GitHub user pysj.
</releaseNotes>
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
Expand Down
7 changes: 6 additions & 1 deletion package.regular.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
<license type="expression">LGPL-3.0-only</license>
<projectUrl>https://github.com/squid-box/SevenZipSharp</projectUrl>
<tags>7z sevenzip sevenzipsharp 7-zip</tags>
<releaseNotes>Fixed broken asynchronous extraction.</releaseNotes>
<releaseNotes>
Ensuring streams provided are at the beginning of the file, thanks to GitHub user fgimian.
Fixed an issues where SFX archives would not be correctly detected, thanks to GitHub user fgimian.
Added support for APFS format, thanks to GitHub user elihwyma.
Added support for Wim format, thanks to GitHub user pysj.
</releaseNotes>
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
Expand Down
17 changes: 17 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
This is a fork from [tomap's fork](https://github.com/tomap/SevenZipSharp) of the [original CodePlex project](https://archive.codeplex.com/?p=sevenzipsharp).

-------------------------------------------------------------

-------------------------------------------------------------

-------------------------------------------------------------

# Project Archived
As of 2024-04-10, I've decided to officially release the final version of this fork - 1.6.2 - and archive the project. I myself don't use it anymore, and the sporadic bursts of activity from me aren't useful and I have a hard time even doing good code reviews on submitted code as I'm not actively working on this anymore.

The bugs that exist will remain, feel free to fork this repository (as I once did from tomap) if you want to fix something.

-------------------------------------------------------------

-------------------------------------------------------------

-------------------------------------------------------------

## Continuous Integration

| Squid-Box.SevenZipSharp | Squid-Box.SevenZipSharp.Lite |
Expand Down

0 comments on commit cf6377d

Please sign in to comment.