aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-03-17 17:44:53 +0000
committerChristopher Faylor <me@cgf.cx>2001-03-17 17:44:53 +0000
commit57499703f25428a4b4274cf1bdbd9771927a74b8 (patch)
tree313df0aec42c9134d319ba72633a6d1deedffd94 /winsup
parent298fad4623c7c9f869fcf8e9aceac983bbb1ee1a (diff)
downloadnewlib-57499703f25428a4b4274cf1bdbd9771927a74b8.zip
newlib-57499703f25428a4b4274cf1bdbd9771927a74b8.tar.gz
newlib-57499703f25428a4b4274cf1bdbd9771927a74b8.tar.bz2
* path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when input is
"foo".
Diffstat (limited to 'winsup')
-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 */