From e182ab75b8afcb67d935aca75844fc466cdff50b Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 18 Jan 2023 13:50:00 -0300 Subject: [PATCH] Added debug for case sensitive differences in file name Related to #366 --- kibot/kiplot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kibot/kiplot.py b/kibot/kiplot.py index e82d6627..b9325b43 100644 --- a/kibot/kiplot.py +++ b/kibot/kiplot.py @@ -52,6 +52,11 @@ except ImportError: exit(NO_YAML_MODULE) +def cased_path(path): + r = glob(re.sub(r'([^:/\\])(?=[/\\]|$)|\[', r'[\g<0>]', path)) + return r and r[0] or path + + def try_register_deps(mod, name): if mod.__doc__: try: @@ -725,6 +730,7 @@ def solve_schematic(base_dir, a_schematic=None, a_board_file=None, config=None, if schematic: schematic = os.path.abspath(schematic) logger.debug('Using schematic: `{}`'.format(schematic)) + logger.debug('Real schematic name: `{}`'.format(cased_path(schematic))) else: logger.debug('No schematic file found') return schematic @@ -756,6 +762,7 @@ def solve_board_file(base_dir, a_board_file=None, sug_b=True): check_board_file(board_file) if board_file: logger.debug('Using PCB: `{}`'.format(board_file)) + logger.debug('Real PCB name: `{}`'.format(cased_path(board_file))) else: logger.debug('No PCB file found') return board_file