为容器增加限制

This commit is contained in:
leo
2023-12-31 18:15:28 +08:00
parent 6b7bef0861
commit 44ef312811
2 changed files with 12 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ def open_selected_file():
def save_file_content():
with open(st.session_state.page_file['filepath'], 'w', encoding='utf-8') as f:
logger.debug(f"save: <\n{st.session_state.file_content}\n>to file {st.session_state.page_file['filepath']}")
f.write(st.session_state.file_content)