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:
@@ -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) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user