Skip to content

Commit

Permalink
Directory indices normalise to no trailing slash
Browse files Browse the repository at this point in the history
Fixes #325.
  • Loading branch information
mnot committed Sep 25, 2023
1 parent 9980b5b commit 1d804a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redbot/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def walk_files(self, dir_name: str, uri_base: bytes = b"") -> Dict[bytes, bytes]
out[b"/%s%s" % (uri_base, uri)] = fh.read()
if uri.endswith(b"/index.html"):
with open(path, "rb") as fh:
out[b"/%s%s" % (uri_base, uri[:-10])] = fh.read()
out[b"/%s%s" % (uri_base, uri[:-11])] = fh.read()
except IOError:
self.console(f"Problem loading static file {path}")
return out
Expand Down

0 comments on commit 1d804a8

Please sign in to comment.