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 Date: Thu, 25 Mar 2004 11:44:55 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: lstat on FAT - Was: Problem with find on FAT drives Message-ID: <20040325104455.GN17229@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4060B627 DOT 8000400 AT scytek DOT de> <20040324155332 DOT GF17229 AT cygbert DOT vinschen DOT de> <4061E702 DOT 1040705 AT scytek DOT de> <20040324205644 DOT GA4580 AT redhat DOT com> <20040324213057 DOT GA296803 AT Worldnet> <20040324214239 DOT GA6079 AT redhat DOT com> <20040325023929 DOT GA335381 AT hpn5170x> <20040325041558 DOT GA6211 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040325041558.GA6211@redhat.com> User-Agent: Mutt/1.4.2i On Mar 24 23:15, Christopher Faylor wrote: > On Wed, Mar 24, 2004 at 09:39:29PM -0500, Pierre A. Humblet wrote: > >On Wed, Mar 24, 2004 at 04:42:39PM -0500, Christopher Faylor wrote: > >>On Wed, Mar 24, 2004 at 04:30:57PM -0500, Pierre A. Humblet wrote: > >>> > >>>I also had a look at the code and reached pretty much the same conclusion > >>>as Volker. Replacing all 'isslash (*src)' and 'isslash (src[x])' in > >>>normalize_posix_path by "isdirsep ()" would yield more consistent results. > >>>I know this code is delicate but the possible drawback isn't obvious. > >> > >>speed disadvantage for nebulous gain. > > > >As you know isdirsep would take 1 extra compare per character. > > > >FWIW I see one place where we could avoid the kind of loop that Volker had. > > > >I wonder if > > char *p = strrchr (src, '\0'); > > /* Detect if the user was looking for a directory. We have to strip the > >should be inside the symlink loop or outside. I guess that depends if > >symlink contents ending with / are special (on Sun the final / is stripped in > >symlinks, dunno about other Unix flavors). > > > >Also normalize_posix_path strips the final /, except when it calls > >normalize_win32_path. That makes the code go through extra hoops > >when resolving c:/the/symlink/, it looks for c:/the/symlink/.lnk > > Corinna! Did I predict this or what? > > I'm quitting my job and getting a job as a psychic in the carnival! Naaah, that prediction trick was a bit too obvious. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/