Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed redirect '~home' to '~all' if home.md doesn't exists.

  • Loading branch information...
commit 28776c10c2267d7926e19990432f657392465ac1 1 parent c1deadd
@shuge authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 zbox_wiki/main.py
View
6 zbox_wiki/main.py
@@ -462,8 +462,10 @@ def wp_read(req_path, show_full_path, auto_toc, highlight, pages_path):
content = buf1 + "\n" + "----" + "\n" + buf2
else:
- web.seeother("/%s?action=edit" % req_path)
- return
+ if req_path == "home" and (not os.path.exists(full_path)):
+ return web.seeother("~all")
+ else:
+ return web.seeother("/%s?action=edit" % req_path)
content = zw_macro2md(text = content, show_full_path = show_full_path, pages_path = pages_path)
Please sign in to comment.
Something went wrong with that request. Please try again.