summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorashok <ashok>2016-07-07 06:30:58 (GMT)
committerashok <ashok>2016-07-07 06:30:58 (GMT)
commit0aa3b5113db3c6c750aa4bbcfdb657dec48c0de1 (patch)
tree6c02f8a6a858f357847f980c4f81293d9de187fb /win/tclWinFile.c
parent5afe70d02240e1acbe825478808f3ef27847c025 (diff)
downloadtcl-0aa3b5113db3c6c750aa4bbcfdb657dec48c0de1.zip
tcl-0aa3b5113db3c6c750aa4bbcfdb657dec48c0de1.tar.gz
tcl-0aa3b5113db3c6c750aa4bbcfdb657dec48c0de1.tar.bz2
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 25c6ea4..4b0b884 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1769,7 +1769,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.
@@ -1793,6 +1793,8 @@ NativeIsExec(
if ((_tcsicmp(path+len-3, TEXT("exe")) == 0)
|| (_tcsicmp(path+len-3, TEXT("com")) == 0)
+ || (_tcsicmp(path+len-3, TEXT("cmd")) == 0)
+ || (_tcsicmp(path+len-3, TEXT("ps1")) == 0)
|| (_tcsicmp(path+len-3, TEXT("bat")) == 0)) {
return 1;
}