1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 06:17:58 +01:00

automatically try to add .exe when running programs on windows

This commit is contained in:
Martin Stubenschrott
2008-05-25 21:02:23 +00:00
parent 69a04eeb09
commit f3926ba422
2 changed files with 17 additions and 0 deletions

View File

@@ -469,6 +469,19 @@ liberator.IO = function () //{{{
file.initWithPath(path);
if (file.exists())
break;
// automatically try to add common file extensions on windows
if (WINDOWS)
{
var extensions = [".exe", ".cmd", ".bat"];
for (let j = 0; j < extensions.length; j++)
{
path = dirs[i] + "\\" + program + extensions[j];
file.initWithPath(path);
if (file.exists())
break;
}
}
}
catch (e) { }
}