mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 16:14:45 +00:00
logs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user