瀏覽代碼

Add specific error text for SZ_ERROR_NO_ARCHIVE.

Martijn Laan 11 月之前
父節點
當前提交
88dcad59d2
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Components/Lzma2/Util/7z/7zMain.c
  2. 二進制
      Projects/Src/Compression.SevenZipDecoder/7zDecode/IS7zDec.obj

+ 3 - 0
Components/Lzma2/Util/7z/7zMain.c

@@ -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 */
 
@@ -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

二進制
Projects/Src/Compression.SevenZipDecoder/7zDecode/IS7zDec.obj