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

Re: Help to review a patch in ELisp



Hi,

Josh Triplett:
> > +       sed -e 's/.* .*/\"&\"/' > $LIST_FILE
> >  
> I can't speak for the rest of the patch without digging into quite a bit
> of the context and assumptions in the elisp, but regarding this bit,
> rather than checking for spaces and only quoting filenames then, just
> *always* quote all filenames.  That also makes sure you test that path
> thoroughly.
> 
Hmm. I notice that there's no code in this patch which removes the quotes
you just added around these file names, which makes me wonder what other
assumptions the code which does interpret them makes.

Also, this code may or may not fail on filenames which contain quotes,
tabs, newlines, backslashes, single quotes, and/or dollar signs, depending
on what then interprets that file.  (Whose filename also should be quoted?)

Some of these characters obviously wouldn't be used by anybody who's even
remotely sane, esp. in the context of source code, but not all of them. I
would at least check whether $ and/or single quote works.

Regarding this bit of elisp, the pattern change looks reasonably sane.

-- 
-- Matthias Urlichs

Attachment: signature.asc
Description: Digital signature


Reply to: