summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolderpunk <solderpunk@sdf.org>2020-03-17 21:09:45 +0100
committerSolderpunk <solderpunk@sdf.org>2020-03-17 21:09:45 +0100
commit44d0e7139d1acc1be5ef8258ef962784c4697853 (patch)
tree70e7dd14e5c51c728452364f21d76292f117e5ce
parent352de60a163a04a0c7e6015b7b7a9180ef43b408 (diff)
Fix bug introduced by changes to default feed title handling.
-rw-r--r--gemfeed.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gemfeed.py b/gemfeed.py
index 404cccd..c724c65 100644
--- a/gemfeed.py
+++ b/gemfeed.py
@@ -35,11 +35,12 @@ def get_feed_title(directory):
the content of the first heading line in the file, otherwise return a
default feed title.
"""
+ default = os.path.basename(directory)
for index_file in ("index.gmi", "index.gemini"):
index_file = os.path.join(directory, index_file)
if os.path.exists(index_file) and is_world_readable(index_file):
return extract_first_heading(index_file, default)
- return os.path.basename(directory)
+ return default
def find_files(directory, n=10):
"""