Skip to content

Commit 6be93bd

Browse files
committed
[DC-195] fix: use /usr/bin/open to show a file/folder in finder (#12379)
1 parent 4281862 commit 6be93bd

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/gui/openfilemanager.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,7 @@ void showInFileManager(const QString &localPath)
109109
p.waitForFinished(5000);
110110
}
111111
} else if (Utility::isMac()) {
112-
QStringList scriptArgs;
113-
scriptArgs << QStringLiteral("-e")
114-
<< QStringLiteral("tell application \"Finder\" to reveal POSIX file \"%1\"")
115-
.arg(localPath);
116-
QProcess::execute(QStringLiteral("/usr/bin/osascript"), scriptArgs);
117-
scriptArgs.clear();
118-
scriptArgs << QStringLiteral("-e")
119-
<< QStringLiteral("tell application \"Finder\" to activate");
120-
QProcess::execute(QStringLiteral("/usr/bin/osascript"), scriptArgs);
112+
QProcess::startDetached("/usr/bin/open", {"-R", localPath});
121113
} else {
122114
QString app;
123115
QStringList args;

0 commit comments

Comments
 (0)