https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=937a2d92e20a47587d6d0634255df5796b893306

commit 937a2d92e20a47587d6d0634255df5796b893306
Author: Corinna Vinschen <cori...@vinschen.de>
Date:   Tue Dec 13 12:21:27 2016 +0100

    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 <cori...@vinschen.de>

Diff:
---
 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 3d07ea1..c6f7c1d 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);

Reply via email to