From c0956ed3b0ad0c3322f0573bb210fc37a8cb754c Mon Sep 17 00:00:00 2001 From: plonibarploni <44826203+plonibarploni@users.noreply.github.com> Date: Sun, 5 Apr 2020 22:33:06 -0400 Subject: [PATCH] Fix 'Show in file browser' for Caja --- src/core/utilities.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp index f4c22e8a2..9c745ae6d 100644 --- a/src/core/utilities.cpp +++ b/src/core/utilities.cpp @@ -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);