Detect a non-list package archive content properly (Bug#22311)
* lisp/emacs-lisp/package.el (package--download-one-archive): Use `read' instead of `read-from-string'; the latter always returns a cons, so the `listp' check on its return value doesn't make sense. It was changed from `read' to `read-from-string' in 2015-04-01 "* emacs-lisp/package.el: Implement asynchronous refreshing", but that change was not needed because `read' works fine on strings as well as buffers.
This commit is contained in:
parent
12c77f6918
commit
6f6d525683
1 changed files with 1 additions and 1 deletions
|
@ -1532,7 +1532,7 @@ similar to an entry in `package-alist'. Save the cached copy to
|
|||
(content (buffer-string))
|
||||
(dir (expand-file-name (format "archives/%s" name) package-user-dir))
|
||||
(local-file (expand-file-name file dir)))
|
||||
(when (listp (read-from-string content))
|
||||
(when (listp (read content))
|
||||
(make-directory dir t)
|
||||
(if (or (not package-check-signature)
|
||||
(member name package-unsigned-archives))
|
||||
|
|
Loading…
Add table
Reference in a new issue