fix: dde-open file failed

QUrl("/tmp/xxx.png").toLocalFile() is Empty..

Issue: https://github.com/linuxdeepin/developer-center/issues/8142
This commit is contained in:
ck 2024-04-23 15:58:59 +08:00 committed by mike
parent e6fd0a61a5
commit 9dd7e7f2a1

View File

@ -968,7 +968,7 @@ LaunchTask ApplicationService::unescapeExec(const QString &str, const QStringLis
execList.remove(location);
auto it = execList.begin() + location;
for (const auto &field : fields) {
auto tmp = QUrl{field};
auto tmp = QUrl::fromUserInput(field);
if (auto scheme = tmp.scheme(); scheme.startsWith("file") or scheme.isEmpty()) {
it = execList.insert(it, tmp.toLocalFile());
} else {