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):