7zip/fix-compatib-with-p7zip.patch
Martin Pluskal 990fe14103 - Update to 24.09:
* The default dictionary size values for LZMA/LZMA2 compression methods
    were increased
  * 7-Zip now can calculate the following hash checksums: SHA-512, SHA-384, SHA3-256 and MD5.
  * APM and HFS support was improved.
  * If an archive update operation uses a temporary archive folder and
    the archive is moved to the destination folder, 7-Zip shows the progress of moving
    the archive file, as this operation can take a long time if the archive is large.
  * The bug was fixed: 7-Zip File Manager didn't propagate Zone.Identifier stream
    for extracted files from nested archives (if there is open archive inside another open
    archive).
  * Some bugs were fixed.

OBS-URL: https://build.opensuse.org/package/show/Archiving/7zip?expand=0&rev=38
2024-12-02 08:46:39 +00:00

42 lines
1.7 KiB
Diff

From: Dario Faggioli <dfaggioli@suse.com>
Date: Wed Jan 26 04:01:09 AM CET 2022
Subject: [PATCH] Console: Avoid terminating on failed password check
File-roller (i.e., GNOME's Archive Manager), which was working fine
with p7zip and p7zip-full, does not work well with 7zip. More specifically,
it is not possible to open or extract a password protected archive, for
which also the list of the files in the archive itself has been hidden.
This seems to happen because now GetPassword_HRESULT() does some kind of
error checking, and depending on the results, cause its calling function
to return with an error, which in turns terminates the 7zz program in
a way that file-roller interpretes as a critical error, and everything
stops.
On the other hand, in p7zip-full, the GetPassword() function wasn't
doing this. There's still a failure, but one that triggers File-roller
to ask the password of the archive, and once that is provided everything
works.
From a CLI perspecvive, nothing changes, and things still work fine and
in the exact same way, no matter whether or not this patch is applied.
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
---
OpenCallbackConsole.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: 7zip/CPP/7zip/UI/Console/OpenCallbackConsole.cpp
===================================================================
--- 7zip.orig/CPP/7zip/UI/Console/OpenCallbackConsole.cpp
+++ 7zip/CPP/7zip/UI/Console/OpenCallbackConsole.cpp
@@ -87,7 +87,7 @@ HRESULT COpenCallbackConsole::Open_Crypt
if (!PasswordIsDefined)
{
ClosePercents();
- RINOK(GetPassword_HRESULT(_so, Password))
+ GetPassword_HRESULT(_so, Password);
PasswordIsDefined = true;
}
return StringToBstr(Password, password);