Skip to content

Commit e0c52fe

Browse files
committed
BUGFIX: Do not allow opening recent directory if directory does not exist
1 parent 6a60d20 commit e0c52fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MethodicConfigurator/frontend_tkinter_directory_selection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ def create_option3_widgets(self, last_vehicle_dir: str):
311311
last_dir.container_frame.pack(expand=False, fill=tk.X, padx=3, pady=5, anchor=tk.NW)
312312

313313
# Check if there is a last used vehicle configuration directory
314-
button_state = tk.NORMAL if last_vehicle_dir else tk.DISABLED
314+
button_state = tk.NORMAL if last_vehicle_dir and self.local_filesystem.directory_exists(last_vehicle_dir) else \
315+
tk.DISABLED
315316
open_last_vehicle_directory_button = ttk.Button(option3_label_frame,
316317
text="Open Last Used Vehicle Configuration Directory",
317318
command=lambda last_vehicle_dir=last_vehicle_dir: \

0 commit comments

Comments
 (0)