Potential bug in kfmclient [patch]

Kevin Krammer kevin.krammer at gmx.at
Thu Apr 13 22:50:13 BST 2006


On Wednesday 12 April 2006 00:55, Kevin Krammer wrote:
> Hi,
>
> I am testing Portland project scripts for return value behavior and I came
> across a strange behavior in kfmclient
>
> kfmclient openURL http://www.kde.org; echo $?
>
> returns 0, as expected
>
> but
>
> kfmclient exec http://www.kde.org; echo $?
>
> returns 1, independent of success or failure at launching
>
> KDE3.5.2, Debian/Unstable packages
>
> From a quick look it seems that m_ok is never initialized nor set when it
> reaches the return.

I checked with current KDE3.5 branch and it looks like a bug to me.

The attached patch initializes the static member m_ok, in case of running a 
KRun object it uses the run object's hasError instead and in case 
of "openProperties" sets m_ok to false in case the dialog gets canceled.

IMHO at least the !run->hasError() changes should be comitted.

Cheers,
Kevin

-- 
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
Moderator: www.mrunix.de (German), www.qtcentre.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfmclient.diff
Type: text/x-diff
Size: 1752 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20060413/c5386e1d/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20060413/c5386e1d/attachment.sig>


More information about the kfm-devel mailing list