From 13fe905684bf297dd709211912e9248302e40886 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 15 Nov 2026 01:35:18 +0100 Subject: [PATCH] Pfadsuche endet auf Windows an der Laufwerkswurzel while _w != "/" lief ausserhalb eines Baums mit lesen/ endlos (Wurzel ist C:\). Jetzt: Abbruch, wenn dirname(_w) == _w. zeit_tells, zeit_tells_spec, denkzeit_dicht_spec. Co-Authored-By: Claude Opus 5.5 --- lesen/zeit_tells.py | 2 +- tests/denkzeit_dicht_spec.py | 2 +- tests/zeit_tells_spec.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lesen/zeit_tells.py b/lesen/zeit_tells.py index f4f2d4a3..4b9269f6 100644 --- a/lesen/zeit_tells.py +++ b/lesen/zeit_tells.py @@ -24,7 +24,7 @@ Aufruf: """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): +while _os.path.dirname(_w) != _w and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w for _u in ("lesen", "entscheiden", "hand", "betrieb"): diff --git a/tests/denkzeit_dicht_spec.py b/tests/denkzeit_dicht_spec.py index d87622ab..fd9bb6e8 100644 --- a/tests/denkzeit_dicht_spec.py +++ b/tests/denkzeit_dicht_spec.py @@ -14,7 +14,7 @@ Geprueft wird: """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): +while _os.path.dirname(_w) != _w and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) for _u in ("lesen", "entscheiden", "hand", "betrieb"): _q = _os.path.join(_w, _u) diff --git a/tests/zeit_tells_spec.py b/tests/zeit_tells_spec.py index 6617ab38..2ebbd883 100644 --- a/tests/zeit_tells_spec.py +++ b/tests/zeit_tells_spec.py @@ -6,7 +6,7 @@ sammeln - laufende Zeit-Sammlung nach jeder Log-Sicherung (Gedaechtnis-Feld `tim """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): +while _os.path.dirname(_w) != _w and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) for _u in ("lesen", "entscheiden", "hand"): _q = _os.path.join(_w, _u)