From 5c46700863bc00fb88e4e2ff0ef69b5980ee481e Mon Sep 17 00:00:00 2001 From: Jakub Dranczewski Date: Mon, 25 Nov 2024 12:23:29 +0000 Subject: [PATCH] Fix _find_file parent stop condition see https://github.com/HBNetwork/python-decouple/issues/172 --- decouple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decouple.py b/decouple.py index 9873fc9..4ece906 100644 --- a/decouple.py +++ b/decouple.py @@ -219,7 +219,7 @@ def _find_file(self, path): # search the parent parent = os.path.dirname(path) - if parent and os.path.normcase(parent) != os.path.normcase(os.path.abspath(os.sep)): + if parent and os.path.normcase(parent) != os.path.normcase(path): return self._find_file(parent) # reached root without finding any files.