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 X-Mailer: The Bat! (v1.029) S/N A0F2A05A Reply-To: Egor Duda Organization: DEO Message-ID: <16160.990705@logos-m.ru> To: Chris Faylor CC: cygwin-developers Subject: bug in "stat_worker" from latest snapshot Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit 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");