Re: [PATCH] Fix GnomeVFS LS parser



Am Dienstag, den 18.10.2005, 10:01 +0200 schrieb Alexander Larsson:
> On Mon, 2005-10-17 at 19:26 +0200, Christian Neumair wrote:
> > Am Montag, den 17.10.2005, 16:18 +0200 schrieb Alexander Larsson:
> > > On Fri, 2005-10-14 at 22:51 +0200, Christian Neumair wrote:
> > > > OK, the GnomeVFS ls -lga parser is seriously hosed by only handling one
> > > > filename at a time, but that's a different topic.
> > > > The attached patch fixes bug 163671 [1]. It makes GnomeVFS pass all
> > > > "test-parse-ls-lga" tests, and even display files named like a time or
> > > > like a year correctly in FTP directories, which was a bit tricky, since
> > > > the FTP module didn't split the string at '\n' characters before passing
> > > > it to the parser. However, since the API suggests that
> > > > gnome_vfs_parse_ls_lga can parse multiple lines ([2]), I've preferred to
> > > > add multiline detection semantics to the latter.
> > > > 
> > > > [1] http://bugzilla.gnome.org/show_bug.cgi?id=163671
> > > > [2] which is - I repeat - NOT true as of writing, it only sets the first
> > > > member of the passed-in filename array
> > > 
> > > I'm not sure why you think the filename argument is an array. Its just a
> > > normal out-parameter.
> > 
> > Ouch, sorry. Please ignore my stupid comment.
> > 
> > > Furthermore, it looks like this is not a full patch. vfs_parse_filedate
> > > adds more arguments, but the calls to it are not changed.
> > 
> > That was removed by accident.
> 
> I'm not sure I understand the newline checks in is_last_column. Is that
> really required?

We seem to convert the incoming char * into a char * array by adding a
new array element to the columns array whenever a space, a carriage
return or a newline character is reached in vfs_split_text. Therefore,
none of the columns array members contains any of these character, and
the information whether we split on a line-break or on a space is lost.

-- 
Christian Neumair <chris gnome-de org>

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]