1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-20 12:39:01 +01:00

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
commit a2a06be62f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -379,7 +379,10 @@ void OpenInFileManager(const QString &path) {
proc.startDetached(command, QStringList() << command_params << "--select" << "--new-window" << path); proc.startDetached(command, QStringList() << command_params << "--select" << "--new-window" << path);
} }
else if (command.startsWith("caja")) { 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 { else {
proc.startDetached(command, QStringList() << command_params << path); proc.startDetached(command, QStringList() << command_params << path);