Skip to content

Commit

Permalink
Add specific error text for SZ_ERROR_NO_ARCHIVE.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Oct 5, 2024
1 parent b6b5c41 commit 88dcad5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Components/Lzma2/Util/7z/7zMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/* Changes by Martijn Laan for Inno Setup:
-Use CP_UTF8 in PrintString
-Change main to mainW to support Unicode archive names
-Add specific error text for SZ_ERROR_NO_ARCHIVE
-Return res on errors instead of always returning 1
Otherwise unchanged */

Expand Down Expand Up @@ -878,6 +879,8 @@ int Z7_CDECL mainW(int numargs, WCHAR *args[])
PrintError("cannot allocate memory");
else if (res == SZ_ERROR_CRC)
PrintError("CRC error");
else if (res == SZ_ERROR_NO_ARCHIVE)
PrintError("not an archive");
else if (res == SZ_ERROR_READ /* || archiveStream.Res != 0 */)
PrintError_WRes("Read Error", archiveStream.wres);
else
Expand Down
Binary file modified Projects/Src/Compression.SevenZipDecoder/7zDecode/IS7zDec.obj
Binary file not shown.

0 comments on commit 88dcad5

Please sign in to comment.