From e565a0a77a4728aa160c67dc52fc74951c52361b Mon Sep 17 00:00:00 2001 From: Matthew Scragg Date: Thu, 10 Dec 2015 21:51:36 -0600 Subject: [PATCH] fix path bugs --- realms/lib/util.py | 2 +- realms/modules/wiki/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/realms/lib/util.py b/realms/lib/util.py index 050182d..b8c6da0 100644 --- a/realms/lib/util.py +++ b/realms/lib/util.py @@ -69,7 +69,7 @@ def extract_name(file_path): def remove_ext(path): - return os.path.splitext(path)[0] + return re.sub(r"\..*$", "", path) def clean_url(url): diff --git a/realms/modules/wiki/views.py b/realms/modules/wiki/views.py index 58c40d2..44144be 100644 --- a/realms/modules/wiki/views.py +++ b/realms/modules/wiki/views.py @@ -77,7 +77,7 @@ def edit(name): # Page doesn't exist return redirect(url_for('wiki.create', name=cname)) - name = remove_ext(page['name']) + name = remove_ext(page['path']) g.assets['js'].append('editor.js') return render_template('wiki/edit.html', name=name,