Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-27 Thread Christopher Faylor
On Sat, Mar 27, 2004 at 12:05:22PM -0500, Pierre A. Humblet wrote: >At 03:03 PM 3/26/2004 -0500, Christopher Faylor wrote: >>[just to provide a non-flip answer to this subject] >>On Wed, Mar 24, 2004 at 09:39:29PM -0500, Pierre A. Humblet wrote: >>>On Wed, Mar 24, 2004 at 04:42:39PM -0500, Christop

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-27 Thread Pierre A. Humblet
At 03:03 PM 3/26/2004 -0500, Christopher Faylor wrote: >[just to provide a non-flip answer to this subject] >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: >>I wonder if >> char *p = strrchr (src, '\0');

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-26 Thread Christopher Faylor
[just to provide a non-flip answer to this subject] 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: >As you know isdirsep would take 1 extra compare per character. > >FWIW I see one place where we could avoid th

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-25 Thread Corinna Vinschen
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

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Christopher Faylor
On Wed, Mar 24, 2004 at 11:33:44PM -0500, Larry Hall wrote: >At 11:15 PM 3/24/2004, cgf wrote: >>I'm quitting my job and getting a job as a psychic in the carnival! > >Aha! CGF unmasked! All his meanness stems from his frustrated, deep- >rooted desire to be a 'carnie'!! Now it all makes sense. > >T

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Larry Hall
At 11:15 PM 3/24/2004, you 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

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Christopher Faylor
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.

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Pierre A. Humblet
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 > >normali

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Christopher Faylor
On Wed, Mar 24, 2004 at 06:12:05PM -0500, Volker Quetschke 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 kn

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Volker Quetschke
With the small problem that we're still working on src and not dst, and we cannot do the replacement on src because it is const. But I think you got the idea. Sorry This is not done for "normal" DOS paths, IMHO consistency would require that all remaining "\" are converted to "/" for all paths. Is

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Volker Quetschke
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 disadv

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Christopher Faylor
On Wed, Mar 24, 2004 at 04:30:57PM -0500, Pierre A. Humblet wrote: >On Wed, Mar 24, 2004 at 03:56:44PM -0500, Christopher Faylor wrote: >> On Wed, Mar 24, 2004 at 02:52:34PM -0500, Volker Quetschke wrote: >> >Hi Corinna, >> > >> >>>Looks pretty similar to me, but I was looking for the following: >>

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Volker Quetschke
Hi! Sorry, I just have to ask this, see below. So again, is this an expected/tolerated behaviour? Yes, it's by design. The answer is "don't use DOS paths". It's nice to be mean, isn't it? How about some clarification: "Don't use DOS paths if you want consistent i-nodes?" You're welcome to use DO

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Pierre A. Humblet
On Wed, Mar 24, 2004 at 03:56:44PM -0500, Christopher Faylor wrote: > On Wed, Mar 24, 2004 at 02:52:34PM -0500, Volker Quetschke wrote: > >Hi Corinna, > > > >>>Looks pretty similar to me, but I was looking for the following: > >>> > >>>$ ls -ldin .\\tmp ./tmp > >>>2919335057drwxr-xr-x 4 1006

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Christopher Faylor
On Wed, Mar 24, 2004 at 02:52:34PM -0500, Volker Quetschke wrote: >Hi Corinna, > >>>Looks pretty similar to me, but I was looking for the following: >>> >>>$ ls -ldin .\\tmp ./tmp >>>2919335057drwxr-xr-x 4 1006 513 0 Mar 10 13:06 ./tmp/ >>>2805415844195 drwxr-xr-x 4 1006 513

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Volker Quetschke
Hi Corinna, Looks pretty similar to me, but I was looking for the following: $ ls -ldin .\\tmp ./tmp 2919335057drwxr-xr-x 4 1006 513 0 Mar 10 13:06 ./tmp/ 2805415844195 drwxr-xr-x 4 1006 513 0 Mar 10 13:06 .\tmp/ I came to that "program" by reducing the find soure to the b

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-24 Thread Corinna Vinschen
On Mar 23 17:11, Volker Quetschke wrote: > $ ls -ldin tmp tmp/. > 2919335057 drwxr-xr-x 4 1006 513 0 Mar 10 13:06 tmp/ > 2919335057 drwxr-xr-x 4 1006 513 0 Mar 10 13:06 tmp/./ > > Looks pretty similar to me, but I was looking for the following: > > $ ls -ldin .\\tmp ./tmp > 2919

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-23 Thread Volker Quetschke
Hi Kaz, I just found a strange problem when using find on a FAT drive. I got: "find: .\tmp changed during execution of find" OK, I analyzed the problem a bit and found that lstat can give different inode numbers on fat, see the attached testcase. Structurally, FAT does not have inodes or hard link

Re: lstat on FAT - Was: Problem with find on FAT drives

2004-03-23 Thread Kaz Kylheku
On Tue, 23 Mar 2004, Volker Quetschke wrote: > Date: Tue, 23 Mar 2004 14:45:41 -0500 > From: Volker Quetschke <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [cygwin] lstat on FAT - Was: Problem with find on FAT drives > > > Hi! > > > > I just found

lstat on FAT - Was: Problem with find on FAT drives

2004-03-23 Thread Volker Quetschke
Hi! I just found a strange problem when using find on a FAT drive. I got: "find: .\tmp changed during execution of find" OK, I analyzed the problem a bit and found that lstat can give different inode numbers on fat, see the attached testcase. To test this you have to have a directory called tmp in