diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2022-10-28 13:42:51 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-10-28 13:44:27 +0300 |
commit | 339bb6e932f4aef047dc6aa1a1894eec8b37063c (patch) | |
tree | fd726c38c518b4d76da6db35fa2fe1920d567012 /winsup/cygwin/fhandler/disk_file.cc | |
parent | 213b53ed355712b97d361a273a87f1162b8b7aab (diff) |
Cygwin: stop handling files with .com suffix like .exe files
.com is a remnant from the past. There are only five executables
left:
chcp.com
format.com
mode.com
more.com
tree.com
Calling them on the command line already requires to use the
suffix anyway. So drop useless .com test from the execve test
for scripts (they are handled earlier in the same function
as executables) and do not handle them like .exe suffixes in
other functions.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/fhandler/disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler/disk_file.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc index 62c18e5e4..6eb466e9c 100644 --- a/winsup/cygwin/fhandler/disk_file.cc +++ b/winsup/cygwin/fhandler/disk_file.cc @@ -518,8 +518,7 @@ fhandler_base::fstat_helper (struct stat *buf) PUNICODE_STRING path = pc.get_nt_native_path (); if (RtlEqualUnicodePathSuffix (path, &ro_u_exe, TRUE) - || RtlEqualUnicodePathSuffix (path, &ro_u_lnk, TRUE) - || RtlEqualUnicodePathSuffix (path, &ro_u_com, TRUE)) + || RtlEqualUnicodePathSuffix (path, &ro_u_lnk, TRUE)) pc.set_exec (); } /* No known suffix, check file header. This catches binaries and |