Skip to content

Commit

Permalink
Reordered ".." to always appear at top
Browse files Browse the repository at this point in the history
Resolves libthinkpad#1
  • Loading branch information
Isopach authored Oct 2, 2019
1 parent 7f3ab79 commit cf93d78
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ def writeIndex(startPath, title = None, footer=None):
html = html.replace("#FOOTER", footer)
html = html.replace("#DIR", root.getPathFromRoot())

# add the back dir
dirsRead.append(File("..").toHTML())

for file in root.getChildren():
# we do not want to index the index itself
if file.getFileName() == "index.html":
Expand All @@ -183,6 +180,10 @@ def writeIndex(startPath, title = None, footer=None):
# fill in the file list
dirsRead.sort()
filesRead.sort()

# add the back dir
dirsRead.append(File("..").toHTML())

html = html.replace("#GEN_DIRS", "".join(str(x) for x in dirsRead))
html = html.replace("#GEN_FILES", "".join(str(x) for x in filesRead))

Expand Down

0 comments on commit cf93d78

Please sign in to comment.