diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index d9c4fe8..0ce12f6 100644 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -138,7 +138,8 @@ def _dotfile_compare(opts, dotfile, tmp): return True ignores = list(set(opts.compare_ignore + dotfile.cmpignore)) - ignores = ignores_to_absolute(ignores, dotfile.dst, debug=opts.debug) + ignores = ignores_to_absolute(ignores, [dotfile.dst, dotfile.src], + debug=opts.debug) insttmp = None if dotfile.template and \ @@ -215,7 +216,7 @@ def _dotfile_install(opts, dotfile, tmpdir=None): LOG.dbg(dotfile.prt()) ignores = list(set(opts.install_ignore + dotfile.instignore)) - ignores = ignores_to_absolute(ignores, dotfile.dst, debug=opts.debug) + ignores = ignores_to_absolute(ignores, [dotfile.dst, dotfile.src], debug=opts.debug) is_template = dotfile.template and Templategen.path_is_template( dotfile.src, diff --git a/dotdrop/updater.py b/dotdrop/updater.py index 7790872..a26d842 100644 --- a/dotdrop/updater.py +++ b/dotdrop/updater.py @@ -96,7 +96,8 @@ class Updater: ret = False new_path = None ignores = list(set(self.ignore + dotfile.upignore)) - ignores = ignores_to_absolute(ignores, dotfile.dst, + prefixes = [dotfile.dst, dotfile.src] + ignores = ignores_to_absolute(ignores, prefixes, debug=self.debug) self.log.dbg(f'ignore pattern(s) for {path}: {ignores}')