From cefb42f5e6a710190350eeaddeaec38b87d5234a Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 18 Mar 2026 13:51:11 +0000 Subject: [PATCH] Make directory comparison case-insensitive Check on IMAT was getting confused between `u:\file.py` and `U:\file.py`. I have no idea how or why windows chooses `u:\` vs `U:\` during `normpath`, but this should fix it... --- src/genie_python/genie.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/genie_python/genie.py b/src/genie_python/genie.py index 47e0afd..de937c5 100644 --- a/src/genie_python/genie.py +++ b/src/genie_python/genie.py @@ -1581,7 +1581,10 @@ def __load_module(name: str, directory: str) -> types.ModuleType: module_location = str(module_file) - if os.path.normpath(os.path.dirname(module_location)) != os.path.normpath(directory): + if ( + os.path.normpath(os.path.dirname(module_location)).lower() + != os.path.normpath(directory).lower() + ): raise ValueError(err_msg) sys.modules[name] = module