Fixed the multiple (incorrect) extension problem for some materials links. Fixes issue #1947.
- Legacy-Id: 11104
This commit is contained in:
parent
0bb8c23909
commit
5107dcf04f
|
@ -549,8 +549,9 @@ def document_main(request, name, rev=None):
|
|||
extension = os.path.splitext(g)[1]
|
||||
t = os.path.splitext(g)[1].lstrip(".")
|
||||
url = doc.href()
|
||||
urlbase, urlext = os.path.splitext(url)
|
||||
if not url.endswith("/") and not url.endswith(extension):
|
||||
url += extension
|
||||
url = urlbase + extension
|
||||
|
||||
if extension == ".txt":
|
||||
content = get_document_content(basename, pathname + extension, split=False)
|
||||
|
|
Loading…
Reference in a new issue