commit 0a77a03150182b265742706815b4900ac155bf17
parent ce2cf8c5c4e9e9181767a0be0a31a625d10b1f50
Author: Solderpunk <solderpunk@sdf.org>
Date: Sun, 11 Aug 2019 22:25:48 +0300
Don't put double /s into URLs.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/av98.py b/av98.py
@@ -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: