Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authenticated: #14308112 Date: Sun, 26 Oct 2003 19:44:32 +0100 From: Pavel Tsekov X-X-Sender: ptsekov AT mordor To: cygwin AT cygwin DOT com Subject: Re: 1.5.1: can't open files beginning with "..." In-Reply-To: <20031026181052.GE28125@redhat.com> Message-ID: References: <20031025221849 DOT GQ1653 AT cygbert DOT vinschen DOT de> <21365 DOT 1067156301 AT www3 DOT gmx DOT net> <20031026181052 DOT GE28125 AT redhat DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 26 Oct 2003, Christopher Faylor wrote: > On Sun, Oct 26, 2003 at 09:18:21AM +0100, Pavel Tsekov wrote: > >> > Does it fix the following: > >> > > >> > Administrator AT mordor ~ > >> > $ cd /usr/bin../ > >> > >> No, it fixes the more than two leading dots problem. The above is > >> a genuin windows problem as you noted in your previous mail. I don't > >> know how to fix this without noticeably slowing down the path conv > >> routine. > > > >I'll try to send my patch for reviewal to cygwin-patches tonight. I have > >used it > >for a while and haven't noticed any perforamance hits. > > > >It works like this: > > > >1) Count the number of dots for each path component > > > >2) Check if the path component consists solely from dots > > > > If it does return ENOENT if the count of the dots is > > greater than 2. > > Why would we go to this effort, though? If the underlying FS gives meaning > to a file named '...................' why should we add overhead to cygwin > to stop it? The path handling code is already slow enough without adding > checks for corner cases. Path components ending in dots are treated like they don't have the trailing dots (dots are ignored). Cygwin already has code which checks for trailing dots in the last path component and reports ENOENT if i remember correctly. But the other path components are unchecked - i.e. cd /usr/bin../ set the current dir to /usr/bin.. which is an error IMHO. Anyway I agree that it is not like everyone types directories which end in dots, so maybe this isnt worth adding. > On the other hand, this *is* something that managed mode should deal with > correctly. Yes, if what the user wants to use such file or directory names. I'll shut up now :) Pavel -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/