Em Monday 23 May 2011, Kevin Kofler escreveu:
> On Tuesday 24 May 2011, Lamarque Vieira Souza wrote:
> > Em Monday 23 May 2011, Kevin Kofler escreveu:
> > > Why not use KStandardDirs::findExe?
> >     
> >     If it works like ' kde4-config --path exe --locate <file>' then it does
> > 
> > not search in /sbin and /usr/sbin.
> 
> findExe also searches in $PATH in addition to the above search path, so if
> the distro puts /sbin and /usr/sbin into $PATH (at least current versions
> of Fedora do that), it also finds executables there by default.
> 
> Plus, findExe can take an optional pathstr parameter which is searched
> instead of $PATH, so you can pass a tweaked PATH to the function.
> 
> By default, findExe will also verify that the executable is actually
> executable, not just existing. This too can be turned off, with an optional
> third parameter, but I guess the check is useful anyway.
> 
> See the documentation.
> 
>         Kevin Kofler

        Yes, it works. Thanks for the tip.

-- 
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
http://planetkde.org/pt-br
_______________________________________________
kde-networkmanager mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-networkmanager

Reply via email to