Potential bug in kfmclient [patch]

Michael Pyne michael.pyne at kdemail.net
Thu Apr 13 22:55:37 BST 2006


On Thursday 13 April 2006 17:50, Kevin Krammer wrote:
> 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.

I actually wrote a similar patch last night after reading this email but 
forgot to reply with the patch.

It's just as well, as your patch is more in-depth.  I would recommend 
committing as well.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20060413/dcab4c5a/attachment.sig>


More information about the kfm-devel mailing list