<table><tr><td style="">dfaure requested changes to this revision.<br />dfaure added a comment.<br />This revision now requires changes to proceed.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10405" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>If only it was that simple, I would have done this years ago.</p>

<p>Download <a href="http://www.davidfaure.fr/2018/weirdcommand.desktop" class="remarkup-link" target="_blank" rel="noreferrer">http://www.davidfaure.fr/2018/weirdcommand.desktop</a> and then running that desktop file, without and then with your patch.<br />
If works for me without, and I bet it fails with your patch, because "if" isn't an executable.<br />
(<a href="https://commits.kde.org/kio/0e28930e6748fb45d152e7c3023a034b7db23854" class="remarkup-link" target="_blank" rel="noreferrer">https://commits.kde.org/kio/0e28930e6748fb45d152e7c3023a034b7db23854</a> shows what executablePath() will return for that Exec line).</p>

<p>The reason this code was in slotProcessExited is that at that point we know something went wrong, and we can try to find out what happened (and if we get the diagnosis slightly wrong, the harm is minimal, an error did happen in any case). OTOH your patch will fail with any sort of shell command in the Exec line, that doesn't start with an executable name.</p>

<p>I think the actual fix is to call a virtual method for that messagebox, so that it can be implemented differently in apps that don't like message boxes (not just plasma but also e.g. dolphin).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10405" rel="noreferrer">https://phabricator.kde.org/D10405</a></div></div><br /><div><strong>To: </strong>hein, dfaure, davidedmundson, mart, ngraham<br /><strong>Cc: </strong>Frameworks, michaelh<br /></div>