This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug in "stat_worker" from latest snapshot


Hi!

  When directory name contains "." (i.e. /usr/X11R.4/bin/xterm)
stat_worker from latest snapshot won't try to add ".exe" suffix.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19

*** syscalls.cc.orig    Sun Jul 04 19:48:51 1999
--- syscalls.cc Sun Jul 04 19:45:27 1999
***************
*** 872,877 ****
--- 872,878 ----
    int res = -1;
    int atts;
    char *win32_name;
+   char *win32_file_name;
    char drive[4] = "X:\\";
    MALLOC_CHECK;

***************
*** 902,909 ****

    /* If we can't find the name, try again with a .exe suffix
       [but only if not already present].  */
    if (atts == -1 && GetLastError () == ERROR_FILE_NOT_FOUND &&
!       !strchr (win32_name, '.'))
      {
        debug_printf ("trying with .exe suffix");
        strcat (win32_name, ".exe");
--- 903,912 ----

    /* If we can't find the name, try again with a .exe suffix
       [but only if not already present].  */
+   win32_file_name = strrchr ( win32_name , '\\' ) ;
+   if ( !win32_file_name ) win32_file_name = win32_name ;
    if (atts == -1 && GetLastError () == ERROR_FILE_NOT_FOUND &&
!       !strchr (win32_file_name, '.'))
      {
        debug_printf ("trying with .exe suffix");
        strcat (win32_name, ".exe");



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]