From 937a2d92e20a47587d6d0634255df5796b893306 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 13 Dec 2016 12:21:27 +0100 Subject: [PATCH] Check for .exe file in cygwin_conv_path So far, when converting from POSIX to Windows notation, cygwin_conv_path fails to check for .exe suffix, so /path/foo did not return /path/foo.exe even if this file exists. Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 3d07ea176..c6f7c1d27 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -3310,7 +3310,7 @@ cygwin_conv_path (cygwin_conv_path_t what, const void *from, void *to, p.check ((const char *) from, PC_POSIX | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP | PC_NO_ACCESS_CHECK | PC_NOWARN - | ((how & CCP_RELATIVE) ? PC_NOFULL : 0)); + | ((how & CCP_RELATIVE) ? PC_NOFULL : 0), stat_suffixes); if (p.error) { set_errno (p.error); @@ -3355,7 +3355,7 @@ cygwin_conv_path (cygwin_conv_path_t what, const void *from, void *to, p.check ((const char *) from, PC_POSIX | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP | PC_NO_ACCESS_CHECK | PC_NOWARN - | ((how & CCP_RELATIVE) ? PC_NOFULL : 0)); + | ((how & CCP_RELATIVE) ? PC_NOFULL : 0), stat_suffixes); if (p.error) { set_errno (p.error);