diff options
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 062f5ab7e..fe4f1d9e0 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1205,6 +1205,16 @@ path_conv::~path_conv () } } +bool +path_conv::is_binary () +{ + DWORD bin; + PBYTE bintest[get_nt_native_path ()->Length + sizeof (WCHAR)]; + return exec_state () == is_executable + && RtlEqualUnicodePathSuffix (get_nt_native_path (), L".exe", TRUE) + && GetBinaryTypeW (get_wide_win32_path ((PWCHAR) bintest), &bin); +} + /* Return true if src_path is a valid, internally supported device name. In that case, win32_path gets the corresponding NT device name and dev is appropriately filled with device information. */ |