aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc10
2 files changed, 12 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5b22491..fc6af74 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Sat Mar 17 12:43:15 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when
+ input is "foo".
+
Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_socket): Set protocol to 0 when address family is
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 24c295f..b95182d 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2472,10 +2472,14 @@ suffix_scan::next ()
{
case SCAN_BEG:
suffixes = suffixes_start;
- if (suffixes)
- nextstate = SCAN_EXTRALNK;
- else
+ if (!suffixes)
nextstate = SCAN_LNK;
+ else
+ {
+ if (!*suffixes->name)
+ suffixes++;
+ nextstate = SCAN_EXTRALNK;
+ }
return 1;
case SCAN_HASLNK:
nextstate = SCAN_EXTRALNK; /* Skip SCAN_BEG */