[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GWorkspace mdextractor problem
From: |
Wolfgang Lux |
Subject: |
Re: GWorkspace mdextractor problem |
Date: |
Wed, 14 Feb 2007 09:30:10 +0100 |
Philippe Roussel wrote:
On 2007-02-12 20:45:48 +0100 Philippe Roussel <p.o.roussel@free.fr>
wrote:
I couldn't find (with limited testing, I admit) something wrong on
my filesystem. GWorkspace (and Nautilus and mc) shows the
directory content without a glitch... I'll try to trace
NSDirectoryEnumerator when I'll have time.
In NSDirectoryEnumerator nextObject method line 2149,
returnFileName = [dir.path stringByAppendingPathComponent:
returnFileName];
returns dir.path if returnFileName starts with '~', it's really
easy to reproduce. I've read stringByAppendingPathComponent code
once and didn't get it but I'm sure you will figure it out easily.
Since no one seems to have answered so far, I had a look. It looks
like the
problem is in the line
unsigned root = rootOf(aString, aLength);
at the beginning of stringByAppendingPathComponent:, which seems
supposed to
skip any leading path separators at the beginning of aString, but
unfortunately
also skips a leading ~name component and also a leading X: component.
The former
is definitely wrong, and the latter is at least wrong on any *nix
system (don't
know whether Windows allows colons inside filenames).
So, I think stringByAppendingPathComponent: should not use rootOf,
but rather
check itself whether aString begins with any path separator
characters or
eventually a drive letter. However, the latter should be done only if
GSPathHandlingWindows() returns YES (using GSPathHandlingUnix() would
be okay
if pathHandling were set to "unix" by default on *nix systems).
Regards
Wolfgang
- Re: GWorkspace mdextractor problem, (continued)
- Re: GWorkspace mdextractor problem, Enrico Sersale, 2007/02/09
- Re: GWorkspace mdextractor problem, Philippe Roussel, 2007/02/10
- Re: GWorkspace mdextractor problem, Enrico Sersale, 2007/02/10
- Re: GWorkspace mdextractor problem, Philippe Roussel, 2007/02/10
- Re: GWorkspace mdextractor problem, Enrico Sersale, 2007/02/10
- Re: GWorkspace mdextractor problem, Philippe Roussel, 2007/02/11
- Re: GWorkspace mdextractor problem, Enrico Sersale, 2007/02/11
- Re: GWorkspace mdextractor problem, Philippe Roussel, 2007/02/11
- Re: GWorkspace mdextractor problem, Philippe Roussel, 2007/02/12
- Re: GWorkspace mdextractor problem, Philippe Roussel, 2007/02/12
- Re: GWorkspace mdextractor problem,
Wolfgang Lux <=
- Re: GWorkspace mdextractor problem, Richard Frith-Macdonald, 2007/02/14
- Re: GWorkspace mdextractor problem, Philippe Roussel, 2007/02/14