summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolderpunk <solderpunk@sdf.org>2020-03-18 18:14:28 +0100
committerSolderpunk <solderpunk@sdf.org>2020-03-18 18:14:28 +0100
commitd43bd2b0bf115b89c6bd99ca9b8377d740bb2442 (patch)
tree316470b19d72765cbdd7c931bdc72844b087d121
parent08ba6b0ff2d336a54437c48a32c859f9cb29da35 (diff)
Add trailing slash to base URL if necessary.
-rw-r--r--gemfeed.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gemfeed.py b/gemfeed.py
index 41bca57..23dc007 100644
--- a/gemfeed.py
+++ b/gemfeed.py
@@ -189,6 +189,8 @@ def main():
base_url = base_url._replace(netloc=base_url.path, path="")
base_url = base_url._replace(scheme="gemini")
args.base_url = urllib.parse.urlunsplit(base_url)
+ if not args.base_url.endswith("/"):
+ args.base_url += "/"
# Build the feed
build_feed(args.directory, args.base_url, args.output, args.n, args.title,