VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-12-02 10:10:30 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-12-04 21:20:42 (GMT)
commit3a9db8d98c1301726bdf26af9698e7cc61a46f71 (patch)
treea3b9b8d512e1edafac1a0789171687bc0d24ece1 /src
parent613ea66c95ada7d3c098a00cae4413d7bd7cf1ba (diff)
downloadVeraCrypt-3a9db8d98c1301726bdf26af9698e7cc61a46f71.zip
VeraCrypt-3a9db8d98c1301726bdf26af9698e7cc61a46f71.tar.gz
Linux: fix Nautilus not detected as file manager on some Gnome based destributions.
Diffstat (limited to 'src')
-rw-r--r--src/Main/UserInterface.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp
index 73c9914..2be5bc7 100644
--- a/src/Main/UserInterface.cpp
+++ b/src/Main/UserInterface.cpp
@@ -834,8 +834,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");
@@ -868,7 +870,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