From 945373df679708fc1fe9e1bb53041db08e854842 Mon Sep 17 00:00:00 2001 From: Martin Green Date: Sun, 19 Jun 2022 01:50:05 +0100 Subject: [PATCH] test --- core/views/expo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/views/expo.py b/core/views/expo.py index 5844445..53ffada 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -123,7 +123,8 @@ def expofilesdir(request, dirpath, filepath): def expowebpage(request, expowebpath, path): '''Adds menus and serves an HTML page ''' - if not os.path.is_file(os.path.normpath(expowebpath / path).encode(sysdefaultencoding)): + p = path.encode(sysdefaultencoding) + if not Path(expowebpath / p).is_file(): # 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")