Fix bug introduced by changes to default feed title handling.

This commit is contained in:
Solderpunk 2020-03-17 21:09:45 +01:00
parent 352de60a16
commit 44d0e7139d
1 changed files with 2 additions and 1 deletions

View File

@ -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):
"""