delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/07/04/19:58:25

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Date: Mon, 5 Jul 1999 03:51:32 +0400
From: Egor Duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.029) S/N A0F2A05A
Reply-To: Egor Duda <deo AT logos-m DOT ru>
Organization: DEO
Message-ID: <16160.990705@logos-m.ru>
To: Chris Faylor <cgf AT cygnus DOT com>
CC: cygwin-developers <cygwin-developers AT sourceware DOT cygnus DOT com>
Subject: bug in "stat_worker" from latest snapshot
Mime-Version: 1.0

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 AT logos-m DOT 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");


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019