parent
36e597a045
commit
84b7fa02bb
@ -368,7 +368,8 @@ void OpenInFileManager(const QString path, const QUrl &url) {
|
|||||||
if (setting.contains("Exec")) {
|
if (setting.contains("Exec")) {
|
||||||
QString cmd = setting.value("Exec").toString();
|
QString cmd = setting.value("Exec").toString();
|
||||||
if (cmd.isEmpty()) break;
|
if (cmd.isEmpty()) break;
|
||||||
command_params = cmd.split(' ');
|
cmd = cmd.remove(QRegularExpression("[%][a-z]*( |$)"));
|
||||||
|
command_params = cmd.split(' ', Qt::SkipEmptyParts);
|
||||||
command = command_params.first();
|
command = command_params.first();
|
||||||
command_params.removeFirst();
|
command_params.removeFirst();
|
||||||
}
|
}
|
||||||
@ -376,13 +377,6 @@ void OpenInFileManager(const QString path, const QUrl &url) {
|
|||||||
if (!command.isEmpty()) break;
|
if (!command.isEmpty()) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command_params.contains("%u")) {
|
|
||||||
command_params.removeAt(command_params.indexOf("%u"));
|
|
||||||
}
|
|
||||||
if (command_params.contains("%U")) {
|
|
||||||
command_params.removeAt(command_params.indexOf("%U"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (command.startsWith("/usr/bin/")) {
|
if (command.startsWith("/usr/bin/")) {
|
||||||
command = command.split("/").last();
|
command = command.split("/").last();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user