diff --git a/scispacy/file_cache.py b/scispacy/file_cache.py index 9ff99180..ac900ed5 100644 --- a/scispacy/file_cache.py +++ b/scispacy/file_cache.py @@ -67,7 +67,9 @@ def url_to_filename(url: str, etag: Optional[str] = None) -> str: etag_hash = sha256(etag_bytes) filename += "." + etag_hash.hexdigest() - filename += "." + last_part + _, ext = os.path.splitext(last_part) + if ext: + filename += ext return filename