diff options
-rw-r--r-- | src/Main/CommandLineInterface.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp index d1ea9099..735cbeef 100644 --- a/src/Main/CommandLineInterface.cpp +++ b/src/Main/CommandLineInterface.cpp @@ -119,62 +119,65 @@ namespace VeraCrypt if (parser.Parse () > 0) throw_err (_("Incorrect command line specified.")); if (parser.Found (L"help")) { ArgCommand = CommandId::Help; return; } if (parser.Found (L"text") && interfaceType != UserInterfaceType::Text) { wstring msg = wstring (_("Option -t or --text must be specified as the first argument.")); wcerr << msg << endl; throw_err (msg); } if (parser.Found (L"version")) { ArgCommand = CommandId::DisplayVersion; return; } // Preferences if (parser.Found (L"load-preferences")) { // Load preferences first to allow command line options to override them Preferences.Load(); ArgMountOptions = Preferences.DefaultMountOptions; } +#if defined(TC_WINDOWS) || defined(TC_MACOSX) ArgAllowScreencapture = parser.Found (L"allow-screencapture"); - +#else + ArgAllowScreencapture = true; // Protection against screenshots is supported only on Windows and MacOS +#endif // Commands if (parser.Found (L"auto-mount", &str)) { CheckCommandSingle(); wxStringTokenizer tokenizer (str, L","); while (tokenizer.HasMoreTokens()) { wxString token = tokenizer.GetNextToken(); if (token == L"devices") { if (ArgCommand == CommandId::AutoMountFavorites) ArgCommand = CommandId::AutoMountDevicesFavorites; else ArgCommand = CommandId::AutoMountDevices; param1IsMountPoint = true; } else if (token == L"favorites") { if (ArgCommand == CommandId::AutoMountDevices) ArgCommand = CommandId::AutoMountDevicesFavorites; else ArgCommand = CommandId::AutoMountFavorites; } else { throw_err (LangString["UNKNOWN_OPTION"] + L": " + token); } |