commit e22b78eceabd49860bb62943f39da6a09fee72f8
parent f2edcba0f6b19717e38a3e96adc8adc262f3b5a5
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Mon, 21 Jan 2019 17:27:39 +0000
Merge pull request #48 from seblemaguer/master
fix urls to access to data tarballs
Diffstat:
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/data/emoji-sets.json b/data/emoji-sets.json
@@ -2,25 +2,25 @@
"emojione-v2-22" : {
"description" : "Emojis provided by Emoji One (version 2), resized to 22px",
"website" : "http://emojione.com",
- "url" : "https://github.com/iqbalansari/emacs-emojify/blob/a81cfd11cdd0eb5b6840d2a7fe95a9505195c1a3/emojione-v2-22.tar?raw=true",
+ "url" : "https://raw.githubusercontent.com/iqbalansari/emacs-emojify/a81cfd11cdd0eb5b6840d2a7fe95a9505195c1a3/emojione-v2-22.tar",
"sha256" : "adbe3cf2c776fe7daf375d8e8dbd4c40567a1dbb753dce1d05e61a2f815572d3"
},
"emojione-v2" : {
"description" : "Emojis provided by Emoji One (version 2)",
"website" : "http://emojione.com",
- "url" : "https://github.com/iqbalansari/emacs-emojify/blob/a81cfd11cdd0eb5b6840d2a7fe95a9505195c1a3/emojione-v2.tar?raw=true",
+ "url" : "https://raw.githubusercontent.com/iqbalansari/emacs-emojify/a81cfd11cdd0eb5b6840d2a7fe95a9505195c1a3/emojione-v2.tar",
"sha256" : "46c5a600a148897da22d42d36f42ad764868568943e96917c33e0fe44113afef"
},
"emojione-v2.2.6-22" : {
"description" : "Emojis provided by Emoji One (version 2.2.6), resized to 22px",
"website" : "http://emojione.com",
- "url" : "https://github.com/iqbalansari/emacs-emojify/blob/4e91ba8c2b3415cd78f53e7026fc76b9ac935fc3/emojione-v2.2.6-22.tar?raw=true",
+ "url" : "https://raw.githubusercontent.com/iqbalansari/emacs-emojify/4e91ba8c2b3415cd78f53e7026fc76b9ac935fc3/emojione-v2.2.6-22.tar",
"sha256" : "56dede1c77ad690eebc21e00913b9c7525d290f1a936f87aad282014b04bf2a7"
},
"emojione-v2.2.6" : {
"description" : "Emojis provided by Emoji One (version 2.2.6)",
"website" : "http://emojione.com",
- "url" : "https://github.com/iqbalansari/emacs-emojify/blob/4e91ba8c2b3415cd78f53e7026fc76b9ac935fc3/emojione-v2.2.6.tar?raw=true",
+ "url" : "https://raw.githubusercontent.com/iqbalansari/emacs-emojify/4e91ba8c2b3415cd78f53e7026fc76b9ac935fc3/emojione-v2.2.6.tar",
"sha256" : "416b5807d9836a7030434710c9b859accce1e2e5c3c0dcae8ef2a0d9483ff2e9"
}
}
diff --git a/emojify.el b/emojify.el
@@ -1394,8 +1394,10 @@ non-interactive mode and `emojify-download-emojis-p' is set to `ask'."
(let ((downloaded-sha (with-temp-buffer
(insert-file-contents-literally destination)
(secure-hash 'sha256 (current-buffer)))))
- (when (string= downloaded-sha (ht-get data "sha256"))
- destination))))
+ (if (string= downloaded-sha (ht-get data "sha256"))
+ destination
+ (error "cannot download from \"%s\" as %s != %s"
+ (ht-get data "url") downloaded-sha (ht-get data "sha256"))))))
(defun emojify--extract-emojis (file)
"Extract the tar FILE in emoji directory."