mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-05 16:46:35 -05:00
Unix: preserve automatic backup-header errors
Limit backup retry recovery to credential errors. Restore header selection and rethrow other failures, including cancellation, in CLI and GUI. Add regression coverage for fallback and credential recovery.
This commit is contained in:
3 files changed
+326
-2
No files matched your search
@@ -1091,12 +1091,18 @@ namespace VeraCrypt
|
||||
{
|
||||
volume = mountWithProtectionRecovery();
|
||||
}
|
||||
catch (...)
|
||||
catch (PasswordException&)
|
||||
{
|
||||
options.UseBackupHeaders = false;
|
||||
autoBackupHeaderUsed = false;
|
||||
ShowWarning (e);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
options.UseBackupHeaders = false;
|
||||
autoBackupHeaderUsed = false;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
else
|
||||
ShowWarning (e);
|
||||
|
||||
@@ -1611,7 +1611,7 @@ namespace VeraCrypt
|
||||
{
|
||||
volume = mountWithProtectionRecovery();
|
||||
}
|
||||
catch (...)
|
||||
catch (PasswordException&)
|
||||
{
|
||||
retryWithCachedPasswords = false;
|
||||
autoBackupHeaderUsed = false;
|
||||
@@ -1620,6 +1620,12 @@ namespace VeraCrypt
|
||||
options.Password.reset();
|
||||
options.Pim = -1;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
autoBackupHeaderUsed = false;
|
||||
options.UseBackupHeaders = false;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user