mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 13:08:51 +08:00
Take sha1 of buffer contents, not buffer
This prevents the sha1 function from attempting and then failing to encode the buffer contents in the wrong encoding. * methods/el-get-http.el (el-get-http-compute-checksum): Call `sha1' on result of `buffer-string', not `current-buffer'.
This commit is contained in:
parent
6d213db41e
commit
42cc1e3a98
|
@ -77,7 +77,9 @@ into the package :localname option or its `file-name-nondirectory' part."
|
||||||
"Compute SHA1 of PACKAGE."
|
"Compute SHA1 of PACKAGE."
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents-literally (el-get-http-dest-filename package url))
|
(insert-file-contents-literally (el-get-http-dest-filename package url))
|
||||||
(sha1 (current-buffer))))
|
;; Note: don't pass buffer object, `sha1' tries (and sometimes
|
||||||
|
;; fails) to encode it.
|
||||||
|
(sha1 (buffer-string))))
|
||||||
|
|
||||||
(defun el-get-http-guess-website (package)
|
(defun el-get-http-guess-website (package)
|
||||||
(plist-get (el-get-package-def package) :url))
|
(plist-get (el-get-package-def package) :url))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user