Merge pull request #399 from plonibarploni/patch-2

Fix 'Show in file browser' for Caja
This commit is contained in:
Jonas Kvinge
2020-04-06 05:21:18 +02:00
committed by GitHub

View File

@@ -379,7 +379,10 @@ void OpenInFileManager(const QString &path) {
proc.startDetached(command, QStringList() << command_params << "--select" << "--new-window" << path);
}
else if (command.startsWith("caja")) {
proc.startDetached(command, QStringList() << command_params << "--no-desktop" << path);
QFileInfo info(path);
if (!info.exists()) return;
QString directory = info.dir().path();
proc.startDetached(command, QStringList() << command_params << "--no-desktop" << directory);
}
else {
proc.startDetached(command, QStringList() << command_params << path);