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