.1
matches .1posix
because a *
is tacked on to the search string:
path = "../www/manpages/%s/%s/man%d/%s.%d%s*.html" % (d, lr, i, t, i, extra)
As to why the ordering is weird, it's because they use glob.glob
, which has weird orderingweird ordering. One quick fix would be to sort by length, which would return shorter (and presumably more exact). In any case, a "fix" from the client side looks difficult.