Fix URLs not getting substituted after download
That is, on the first run of MIRROR-IMG, no mirrored URLs got substituted — and on subsequent runs, only previously-downloaded URLS did.
This commit is contained in:
parent
06890e2395
commit
771241cb1d
|
@ -139,8 +139,9 @@ already set)."
|
||||||
(defun http-fetch (url path)
|
(defun http-fetch (url path)
|
||||||
"Download a URL to a path; if successful, returns the pathname. Otherwise, NIL."
|
"Download a URL to a path; if successful, returns the pathname. Otherwise, NIL."
|
||||||
(handler-case
|
(handler-case
|
||||||
(and (dexador:fetch (url-encode-uri url) path)
|
; DEXADOR:FETCH returns nil on success, errors on fail. Hence the OR.
|
||||||
(pathname path))
|
(or (dexador:fetch (url-encode-uri url) path)
|
||||||
|
(pathname path))
|
||||||
(cl-user::file-exists ()
|
(cl-user::file-exists ()
|
||||||
path)
|
path)
|
||||||
(error nil)))
|
(error nil)))
|
||||||
|
|
Ŝarĝante…
Reference in New Issue