mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-22 06:12:35 +00: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:
@@ -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