summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-07-08 12:38:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-07-08 12:38:35 (GMT)
commitb2e1bb03b175a89de9932b2cab305e60fedee0e0 (patch)
treee32872c2f8c2b84ab90793ad0d03693d1fb32217 /win/tclWinFile.c
parentef99853da44d97050a8b5b8ced40182b54accfe5 (diff)
downloadtcl-b2e1bb03b175a89de9932b2cab305e60fedee0e0.zip
tcl-b2e1bb03b175a89de9932b2cab305e60fedee0e0.tar.gz
tcl-b2e1bb03b175a89de9932b2cab305e60fedee0e0.tar.bz2
(cherry-pick): Bugfix [5d7ea04580]. Treat .cmd and .ps1 files are executable on Windows.
Diffstat (limited to 'win/tclWinFile.c')
-rwxr-xr-xwin/tclWinFile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 41de4a8..e671058 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1783,7 +1783,7 @@ NativeAccess(
* NativeIsExec --
*
* Determines if a path is executable. On windows this is simply defined
- * by whether the path ends in any of ".exe", ".com", or ".bat"
+ * by whether the path ends in a standard executable extension.
*
* Results:
* 1 = executable, 0 = not.
@@ -1834,6 +1834,8 @@ NativeIsExec(
if ((strcasecmp(p, "exe") == 0)
|| (strcasecmp(p, "com") == 0)
+ || (strcasecmp(p, "cmd") == 0)
+ || (strcasecmp(p, "ps1") == 0)
|| (strcasecmp(p, "bat") == 0)) {
/*
* File that ends with .exe, .com, or .bat is executable.