strip directory from OpenInFileManager command (#436)

This commit is contained in:
plonibarploni 2020-05-14 16:19:26 -04:00 committed by GitHub
parent c7d4624282
commit f26a0df4a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -367,6 +367,10 @@ void OpenInFileManager(const QString &path) {
command_params.removeAt(command_params.indexOf("%U"));
}
if (command.startsWith("/usr/bin/")) {
command = command.split("/").last();
}
if (command.isEmpty() || command == "exo-open") {
QFileInfo info(path);
if (!info.exists()) return;