From 64472c7850661e7e50d851297ef738b5972d3de1 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 22 Feb 2026 16:54:52 +0100 Subject: [PATCH] Fix nav_path_input write-after-widget error on invalid path Use _sync_nav_path flag to defer the revert to the next rerun, before the widget is instantiated. Co-Authored-By: Claude Opus 4.6 --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 9ef121d..c5e75b1 100644 --- a/app.py +++ b/app.py @@ -63,7 +63,7 @@ with st.sidebar: st.session_state.loaded_file = None st.rerun() else: - st.session_state.nav_path_input = str(st.session_state.current_dir) + st.session_state._sync_nav_path = True st.rerun() # --- Favorites System ---