I attached a patch that should implement the desired behavior. Please glance it over, before I commit. <br><br>RCS is available on Windows as well, to maintain cross platform compatibility will I need to search for "rcs.exe
" in addition to "rcs", or will KStandardDirs::findExe("rcs") find both cases?<br><br>Thanks!<br><br>Greg<br>-<br><br>On 2/7/06, Martijn Klingens <<a href="mailto:klingens@kde.org">klingens@kde.org
</a>> wrote:<br>> On Friday 03 February 2006 02:05, Allen Winter wrote:<br>> > On Thursday 02 February 2006 04:02, Gregory Hayes wrote:<br>> > > That is a good point, I didn't think of the path issue! I believe the LSB
<br>> > > specifies /usr/bin as the RCS default, but other platforms may pop it in<br>> > > a different part of the tree. Is there a way to just remove "." from the<br>> > > QProcess $PATH? If not I would suggest "/bin:/usr/bin:/usr/local/bin"
<br>> > > (but someone could be creative and stick it in /opt/rcs-5.7/bin or<br>> > > something). RCS is likely "rcs.exe" on Windows too, so we may need to<br>> > > massage that as well (if it matters to QProcess).
<br>> ><br>> > I just committed a change that uses the $PATH you suggest.<br>> <br>> That runs shell commands though. As long as qFilename is properly quoted it<br>> doesn't allow arbitrary command execution per se, but it still seems like a
<br>> needless security risk to me.<br>> <br>> Why don't you pass the result of KStandardDirs::findExe instead of relying<br>> on /usr/bin/env?<br>> <br>> See<br>> <br>> <a href="http://developer.kde.org/documentation/library/cvs-api/kdelibs-apidocs/kdecore/html/classKStandardDirs.html#e1">
http://developer.kde.org/documentation/library/cvs-api/kdelibs-apidocs/kdecore/html/classKStandardDirs.html#e1</a><br>> <br>> That also makes it somewhat more portable towards non-Unix platforms where the<br>> 'VAR=value cmd --args' style of invocation is often unavailable. (Not to
<br>> mention that /usr/bin/env is often unavailable, but so is rcs probably as<br>> well, making this possibly a moot point.)<br>> <br>> --<br>> Martijn<br>> <br>