diff --git a/dotdrop/templategen.py b/dotdrop/templategen.py index 2584fb4..f848d08 100644 --- a/dotdrop/templategen.py +++ b/dotdrop/templategen.py @@ -266,12 +266,12 @@ class Templategen: @staticmethod def path_is_template(path, debug=False): """recursively check if any file is a template within path""" - if debug: - LOG.dbg(f'is template: {path}', force=True) path = os.path.expanduser(path) if not os.path.exists(path): # does not exist + if debug: + LOG.dbg(f'is NOT template: \"{path}\"', force=True) return False if os.path.isfile(path): @@ -285,12 +285,18 @@ class Templategen: # recursively explore directory if Templategen.path_is_template(fpath, debug=debug): + if debug: + LOG.dbg(f'is indeed template: \"{path}\"', force=True) return True else: # check if file is a template if Templategen._is_template(fpath, debug=debug): + if debug: + LOG.dbg(f'is indeed template: \"{path}\"', force=True) return True + if debug: + LOG.dbg(f'is NOT template: \"{path}\"', force=True) return False @staticmethod