diff --git a/src/mirror-img.lisp b/src/mirror-img.lisp index 8dcd91c..2d1094b 100644 --- a/src/mirror-img.lisp +++ b/src/mirror-img.lisp @@ -139,8 +139,9 @@ already set)." (defun http-fetch (url path) "Download a URL to a path; if successful, returns the pathname. Otherwise, NIL." (handler-case - (and (dexador:fetch (url-encode-uri url) path) - (pathname path)) + ; DEXADOR:FETCH returns nil on success, errors on fail. Hence the OR. + (or (dexador:fetch (url-encode-uri url) path) + (pathname path)) (cl-user::file-exists () path) (error nil)))