This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Patch to allow trailing dots on managed mounts
On Thu, Dec 16, 2004 at 10:04:41PM -0500, Pierre A. Humblet wrote:
> * path.cc (path_conv::check): Check the output Win32 path for trailing
> spaces and dots, not the input path.
Ok. I've convinced myself that doing it what I consider to be the most
forgiving way is going to be too expensive, introducing extra code for
an unlikely corner case in a routine that is time-sensitive. So, I'm
checking in a variation of this patch. It didn't work out of the box
and I wanted to add some extra checking so I rewrote part of the patch.
For now, I'm disallowing all use of '.\' and ' \' in a path. It seems
more consistent to disallow everything than to allow some stuff. I
didn't change the symlink code to disallow "ln -s foo bar..." If someone
actually complains about this, maybe I will.
So, "ls /bin........." works, "ls /bin./pwd.exe" doesn't work and "ls
/cygwin/c/cygwin/bin./pwd.exe" doesn't work either. Nor does
"ls c:\cygwin\bin.\pwd.exe". I don't know if we'll hear complaints about
this one or not.
>Also, for my info, what is the unc\ in
> !strncasematch (this->path + 4, "unc\\", 4)))
>around line 868? I have never seen that documented.
I've always wondered about that myself. I am pretty sure it predates
me. I've removed that test. It doesn't make any sense to me either.
Thanks, Pierre.
cgf