refact: add some checks

Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
ComixHe
2023-11-15 10:29:13 +08:00
committed by Comix
parent b9bbfb7f6d
commit 3d8b834e3c
3 changed files with 16 additions and 2 deletions

View File

@ -863,7 +863,7 @@ LaunchTask ApplicationService::unescapeExec(const QString &str, const QStringLis
}
auto list = matcher.capturedTexts();
if (list.count() > 1) {
if (list.count() != 1) {
qWarning() << "invalid exec format, all filed code will be ignored.";
for (const auto &code : list) {
execList.removeOne(code);