VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/TextUserInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/TextUserInterface.cpp')
-rw-r--r--src/Main/TextUserInterface.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index 8cd010b3..61b8b8a6 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -317,7 +317,40 @@ namespace VeraCrypt
}
catch (PasswordException &e)
{
- ShowInfo (e);
+ bool bFailed = true;
+ if (!options->UseBackupHeaders)
+ {
+ try
+ {
+ volume = Core->OpenVolume (
+ options->Path,
+ options->PreserveTimestamps,
+ options->Password,
+ options->Pim,
+ kdf,
+ false,
+ options->Keyfiles,
+ options->Protection,
+ options->ProtectionPassword,
+ options->ProtectionPim,
+ options->ProtectionKdf,
+ options->ProtectionKeyfiles,
+ true,
+ volumeType,
+ true
+ );
+
+ bFailed = false;
+ }
+ catch (...)
+ {
+ }
+ }
+
+ if (bFailed)
+ ShowInfo (e);
+ else
+ ShowInfo ("HEADER_DAMAGED_AUTO_USED_HEADER_BAK");
}
}