From e0e63a747fe88ec9b58472434b912772b3873465 Mon Sep 17 00:00:00 2001 From: acute Date: Fri, 6 Mar 2026 07:51:39 +0000 Subject: [PATCH] Fix redirect bug where no usb is inserted --- app/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index b970d69..01962ce 100644 --- a/app/routes.py +++ b/app/routes.py @@ -116,7 +116,7 @@ def index(): def files(path): base_path = app.config["BUTTERBOX_USB_PATH"] if not os.path.exists(base_path): - flash(_('No USB inserted.')) + return redirect(url_for('index')) current_path = os.path.join(base_path, path) render_files = [] if os.path.exists(current_path):