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:
Mounir IDRASSI committed 2026-09-28 15:23:50 +02:00
1 parent 83cb2471bb
commit c91f386f00
3 files changed
+326 -2

No files matched your search

+7 -1
View File
@@ -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
{