[PATCH] Consider extensions for special names in managed mode

Igor Pechtchanski pechtcha@cs.nyu.edu
Wed Aug 13 14:19:00 GMT 2003


On Wed, 13 Aug 2003, Ronald Landheer-Cieslak wrote:

> On Tue, Aug 12, 2003 at 01:39:18PM -0400, Igor Pechtchanski wrote:
> > Ronald,
> >
> > I think there might be a bug in the way managed mode figures special
> > filenames.  Try simply "touch aux" instead of "touch aux.x".  If that
> > works, it'll confirm my reading the code.  I'll submit a patch later today
> > if noone beats me to it.
> >       Igor
>
> `touch aux' works like a charm :|
>
> rlc

Yeah.  I promised a patch, didn't I?  *Sigh*.
	Igor
==============================================================================
2003-08-13  Igor Pechtchanski  <pechtcha@cs.nyu.edu>

	* path.cc (special_name): Add checks for some specials
	followed by a "." and a FIXME comment.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton
-------------- next part --------------
Index: winsup/cygwin/path.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
retrieving revision 1.262
diff -u -p -r1.262 path.cc
--- winsup/cygwin/path.cc	5 Aug 2003 04:49:44 -0000	1.262
+++ winsup/cygwin/path.cc	13 Aug 2003 14:16:57 -0000
@@ -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;


More information about the Cygwin-patches mailing list