1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:09:44 +00:00

refactoring

This commit is contained in:
deadc0de6
2023-05-04 21:11:53 +02:00
committed by deadc0de
parent 83511a62d8
commit 3425eeb5c7
2 changed files with 4 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ from dotdrop.updater import Updater
from dotdrop.comparator import Comparator
from dotdrop.importer import Importer
from dotdrop.utils import get_tmpdir, removepath, \
uniq_list, patch_ignores, dependencies_met, \
uniq_list, ignores_to_absolute, dependencies_met, \
adapt_workers, check_version, pivot_path
from dotdrop.linktypes import LinkTypes
from dotdrop.exceptions import YamlException, \
@@ -138,7 +138,7 @@ def _dotfile_compare(opts, dotfile, tmp):
return True
ignores = list(set(opts.compare_ignore + dotfile.cmpignore))
ignores = patch_ignores(ignores, dotfile.dst, debug=opts.debug)
ignores = ignores_to_absolute(ignores, dotfile.dst, debug=opts.debug)
insttmp = None
if dotfile.template and \
@@ -216,7 +216,7 @@ def _dotfile_install(opts, dotfile, tmpdir=None):
LOG.dbg(dotfile.prt())
ignores = list(set(opts.install_ignore + dotfile.instignore))
ignores = patch_ignores(ignores, dotfile.dst, debug=opts.debug)
ignores = ignores_to_absolute(ignores, dotfile.dst, debug=opts.debug)
is_template = dotfile.template and Templategen.path_is_template(
dotfile.src,

View File

@@ -283,7 +283,7 @@ def uniq_list(a_list):
return new
def patch_ignores(ignores, prefix, debug=False):
def ignores_to_absolute(ignores, prefix, debug=False):
"""allow relative ignore pattern"""
new = []
LOG.dbg(f'ignores before patching: {ignores}', force=debug)