Make http retrieval synchronous when it needs to be

This commit is contained in:
Dave Abrahams 2010-12-27 00:02:07 -09:00 committed by Dimitri Fontaine
parent 2f53408bf9
commit 43a12a5dc7

View File

@ -1125,8 +1125,14 @@ into the package :localname option or its `file-name-nondirectory' part."
(concat (file-name-as-directory pdir) fname))))
(unless (file-directory-p pdir)
(make-directory pdir))
(url-retrieve
url 'el-get-http-retrieve-callback `(,package ,post-install-fun ,dest ,el-get-sources))))
(if (not el-get-default-process-sync)
(url-retrieve url 'el-get-http-retrieve-callback
`(,package ,post-install-fun ,dest ,el-get-sources))
(with-current-buffer (url-retrieve-synchronously url)
(el-get-http-retrieve-callback nil package post-install-fun dest el-get-sources)))))
;;