diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-01-03 09:29:09 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-01-03 09:30:21 +0100 |
commit | ea8e8e517e7829a5cdbc5731f26844cfb5597618 (patch) | |
tree | 9f5c96593ff2f2b9bc8257f0ed426fc2db98b52f | |
parent | 723fcfa64dc2e4e4c6efc8a0c8d5cd05c0eaf944 (diff) | |
download | VeraCrypt-ea8e8e517e7829a5cdbc5731f26844cfb5597618.tar.gz VeraCrypt-ea8e8e517e7829a5cdbc5731f26844cfb5597618.zip |
Linux: Restore Nautilus fix that was mistakenly removed by Whirlpool optimization commit
-rw-r--r-- | src/Main/UserInterface.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp index 1648d94c..c7d975de 100644 --- a/src/Main/UserInterface.cpp +++ b/src/Main/UserInterface.cpp @@ -838,8 +838,10 @@ namespace VeraCrypt #else // MIME handler for directory seems to be unavailable through wxWidgets wxString desktop = GetTraits()->GetDesktopEnvironment(); + bool xdgOpenPresent = wxFileName::IsFileExecutable (wxT("/usr/bin/xdg-open")); + bool nautilusPresent = wxFileName::IsFileExecutable (wxT("/usr/bin/nautilus")); - if (desktop == L"GNOME") + if (desktop == L"GNOME" || (desktop.empty() && !xdgOpenPresent && nautilusPresent)) { args.push_back ("--no-default-window"); args.push_back ("--no-desktop"); @@ -872,7 +874,7 @@ namespace VeraCrypt catch (exception &e) { ShowError (e); } } } - else if (wxFileName::IsFileExecutable (wxT("/usr/bin/xdg-open"))) + else if (xdgOpenPresent) { // Fallback on the standard xdg-open command // which is not always available by default |