Fix 'Show in file browser' for Caja

This commit is contained in:
plonibarploni
2020-04-05 22:33:06 -04:00
committed by GitHub
parent 3fdbe84573
commit c0956ed3b0

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);