From 6763d47b1e380359b108457794f83ed38632f94f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 13 Aug 2003 17:28:00 +0000 Subject: [PATCH] * path.cc (special_name): Add checks for some specials followed by a "." and a FIXME comment. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index d5b91c33a..57f7092cc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-08-13 Igor Pechtchanski + + * path.cc (special_name): Add checks for some specials followed by + a "." and a FIXME comment. + 2003-08-13 Corinna Vinschen * cygwin.din: Accomodate change from cygwin_lstat to lstat. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 512720e8e..7241994a2 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1418,10 +1418,15 @@ special_name (const char *s, int inc = 1) if (strpbrk (s, special_chars)) return !strncasematch (s, "%2f", 3); + // FIXME: add com0 and {com,lpt}N.* if (strcasematch (s, "nul") + || strncasematch (s, "nul.", 4) || strcasematch (s, "aux") + || strncasematch (s, "aux.", 4) || strcasematch (s, "prn") + || strncasematch (s, "prn.", 4) || strcasematch (s, "con") + || strncasematch (s, "con.", 4) || strcasematch (s, "conin$") || strcasematch (s, "conout$")) return -1;