mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-30 23:13:31 +01:00
Linux/OSX: make CLI switch --import-token-keyfiles compatible with Non-Interactive
mode by using keyfiles passed as arguments and check the Non-Interactive mode switch.
This commit is contained in:
parent
89a8b0c262
commit
c8beacbdd7
@ -1056,9 +1056,18 @@ namespace VeraCrypt
|
|||||||
slotId = (CK_SLOT_ID) AskSelection (tokens.back().SlotId, tokens.front().SlotId);
|
slotId = (CK_SLOT_ID) AskSelection (tokens.back().SlotId, tokens.front().SlotId);
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr <KeyfileList> keyfiles = AskKeyfiles();
|
shared_ptr <KeyfileList> keyfiles;
|
||||||
if (keyfiles->empty())
|
|
||||||
throw UserAbort();
|
if (CmdLine->ArgKeyfiles.get() && !CmdLine->ArgKeyfiles->empty())
|
||||||
|
keyfiles = CmdLine->ArgKeyfiles;
|
||||||
|
else if (!Preferences.NonInteractive)
|
||||||
|
{
|
||||||
|
keyfiles = AskKeyfiles();
|
||||||
|
if (keyfiles->empty())
|
||||||
|
throw UserAbort();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw MissingArgument (SRC_POS);
|
||||||
|
|
||||||
foreach_ref (const Keyfile &keyfilePath, *keyfiles)
|
foreach_ref (const Keyfile &keyfilePath, *keyfiles)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user