Review Request: Extend KStandardDirs::find[All]Exe() to also look for .com, and .bat on Windows

Thomas Friedrichsmeier thomas.friedrichsmeier at
Tue Apr 6 16:53:21 BST 2010

This is an automatically generated e-mail. To reply, visit:

(Updated 2010-04-06 15:53:21.359159)

Review request for kdelibs, Jaroslaw Staniek and Patrick Spendrin.


Thanks for that info. The updated version of the patch makes use of the PATHEXT environment variable as suggested (falling back to .com;.exe;.bat if that is not available).


On Windows, KStandardDirs::findExe(), and findAllExe() append ".exe" to the filename to look for. However, executable files on Windows may also end in .com or .bat. Therefore, this patch looks for all three extensions in the order .exe, .com, .bat.

For example, rkward ships with a wrapper script rkward.bat. kwinstartmenu relies on KStandardDirs::findExe() to locate the executables referenced in .desktop files, and fails to find rkward.bat. This patch fixes that.

P.S.: Where should windows-specific review requests go to?

Diffs (updated)

  trunk/KDE/kdelibs/kdecore//kernel/kstandarddirs.cpp 1106410 



Non-systematic. kwinstartmenu now adds rkward as expected. All other apps are added as before.

Ironically, the unittests all fail for me due to failure to find the test executables (also without this patch!), so I cannot run them, ATM.



More information about the kde-core-devel mailing list