summaryrefslogtreecommitdiffstats
path: root/core/views/expo.py
diff options
context:
space:
mode:
authorMartin Green <martin.speleo@gmail.com>2022-06-19 01:52:09 +0100
committerMartin Green <martin.speleo@gmail.com>2022-06-19 01:52:09 +0100
commit8372d9d85cadf5481c246d1228571285e7a204c8 (patch)
treec8188be0e1575a4d9e1c0682fd639832fcb44d29 /core/views/expo.py
parent945373df679708fc1fe9e1bb53041db08e854842 (diff)
downloadtroggle-8372d9d85cadf5481c246d1228571285e7a204c8.tar.gz
troggle-8372d9d85cadf5481c246d1228571285e7a204c8.tar.bz2
troggle-8372d9d85cadf5481c246d1228571285e7a204c8.zip
test
Diffstat (limited to 'core/views/expo.py')
-rw-r--r--core/views/expo.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index 53ffada..556be04 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -123,8 +123,7 @@ def expofilesdir(request, dirpath, filepath):
def expowebpage(request, expowebpath, path):
'''Adds menus and serves an HTML page
'''
- p = path.encode(sysdefaultencoding)
- if not Path(expowebpath / p).is_file():
+ if not os.path.is_file(os.path.normpath(expowebpath / path).encode(sysdefaultencoding):
# Should not get here if the path has suffix "_edit"
print(f' - 404 error in expowebpage() {path}')
return render(request, 'pagenotfound.html', {'path': path}, status="404")