From a07515cdb2da363efc722ad82b97bd712c0f0cd3 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Wed, 11 May 2022 21:33:31 -0500 Subject: [PATCH] fixes it --- app/luclient.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/luclient.py b/app/luclient.py index 36b9d37..49efbf0 100644 --- a/app/luclient.py +++ b/app/luclient.py @@ -147,10 +147,11 @@ def brick_list(): return response -@luclient_blueprint.route('/ldddb/') -def dir_listing(path): +@luclient_blueprint.route('/ldddb/', defaults={'req_path': ''}) +@luclient_blueprint.route('/ldddb/') +def dir_listing(req_path): # Joining the base and the requested path - rel_path = pathlib.Path(str(pathlib.Path(f'app/luclient/res/{path}').resolve())) + rel_path = pathlib.Path(str(pathlib.Path(f'app/luclient/res/{req_path}').resolve())) # Return 404 if path doesn't exist if not rel_path.exists(): return abort(404)