bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#48137: 27.2; `package-install-file' fails when loading a package fil


From: Eli Zaretskii
Subject: bug#48137: 27.2; `package-install-file' fails when loading a package file with DOS line endings
Date: Thu, 06 May 2021 11:12:26 +0300

> From: Ioannis Kappas <ioannis.kappas@gmail.com>
> Date: Thu, 6 May 2021 07:55:52 +0100
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 48137@debbugs.gnu.org
> 
> > My idea was to read the file literally, without decoding, then parse
> > the package headers from that.
> 
> I suppose you mean something along the other option below?

It could be, but as I said up-thread, this specific change allows a
lone \r to be taken as an end of line, which I think is wrong.  We
should only support a single \n or a \r\n pair.  See this comment I
made back then:

> > > -                   "[^\n]+" "[^$\n]+")))
> > > +                   "[^\n\r]+" "[^$\n\r]+")))
> >
> > This is better, but IMO the code should be rewritten not to allow a
> > lone CR character, only either a lone LF or the CRLF pair.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]