fixes a crash with some invalid URLs

This commit is contained in:
Ploum 2023-10-14 17:22:47 +02:00
parent 010288a6fb
commit 924eed3775
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ Changes since beta1
- fixes a crash with RSSfeeds without <link> element
- fixes a bug in HTML renderer where some hX element were not closed properly
- fixes input in Gemini while online
- fixes a crash with invalid URL
- attempt at hiding XMLparsedAsHTMLWarning from BS4 library
- chafa now used by default everywhere if version > 1.10
- ignoring encoding error in ansicat

View File

@ -268,7 +268,7 @@ def set_error(url,err):
cache = get_cache_path(url)
if is_cache_valid(url):
os.utime(cache)
else:
elif cache:
cache_dir = os.path.dirname(cache)
root_dir = cache_dir
while not os.path.exists(root_dir):