From 1fa3770e6ee34910ebe9924c38f8e03c6dc22290 Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Sun, 6 Sep 2026 21:31:53 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20ESC=20im=20Ollama-Speicherort-Dialog=20f?= =?UTF-8?q?=C3=A4llt=20auf=20Standardpfad=20zur=C3=BCck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit whiptail liefert bei ESC den Exit-Code 255, der bisher wie ein explizites "Nein" (Exit-Code 1) behandelt und in den Eingabedialog für einen eigenen Pfad geleitet wurde. Das widersprach dem direkt folgenden Eingabedialog, in dem ESC/Abbruch stattdessen den Standardpfad übernimmt. ESC verhält sich jetzt in beiden Dialogen gleich. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017WMUd2fGsPCtTCVQkSS5TA --- lib/utils.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/utils.sh b/lib/utils.sh index 8e86836..343e275 100755 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -259,10 +259,15 @@ prompt_ollama_models_path() { # whether the configured default path should be used, and only show # the free-text path dialog (pre-filled with that default) if not. if command_exists whiptail && has_tty; then - if run_whiptail --title "Ollama KI-Modelle Speicherort" \ + local yesno_status=0 + run_whiptail --title "Ollama KI-Modelle Speicherort" \ --yes-button "Standard verwenden" --no-button "Eigenen Pfad angeben" \ --yesno "Standard-Speicherort für Ollama-Modelle:\n\n$default_path\n\nMöchtest du diesen Speicherort verwenden?" \ - 12 70; then + 12 70 || yesno_status=$? + if [[ "$yesno_status" -eq 0 || "$yesno_status" -eq 255 ]]; then + # Yes, or ESC/Cancel (255) - fall back to the configured + # default, consistent with the inputbox dialog below where + # ESC/Cancel also keeps the default instead of asking again. chosen="$default_path" else local tui_tmp