Don't put double /s into URLs.

This commit is contained in:
Solderpunk 2019-08-11 22:25:48 +03:00
parent ce2cf8c5c4
commit 0a77a03150
1 changed files with 3 additions and 2 deletions

View File

@ -130,8 +130,9 @@ def fix_ipv6_url(url):
def geminiitem_to_url(gi):
if gi and gi.host:
return ("gemini://%s:%d/%s" % (
gi.host, int(gi.port), gi.path))
return ("gemini://%s:%d%s%s" % (
gi.host, int(gi.port), "" if gi.path.startswith("/") else "/",
gi.path))
elif gi:
return gi.path
else: