1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 15:39:43 +00:00

fix empty ignore patterns

This commit is contained in:
deadc0de6
2023-09-18 15:11:24 +02:00
parent cdb9b7e983
commit 9953f07ba7

View File

@@ -54,16 +54,17 @@ class Importer:
self.log = Logger(debug=self.debug)
# patch ignore patterns
for ign in ignore:
if ign.startswith('!'):
self.ignore.append(ign)
continue
if ign.startswith('*/'):
self.ignore.append(ign)
continue
newign = f'*/{ign}'
self.log.dbg(f'patching ignore {ign} to {newign}')
self.ignore.append(newign)
if ignore:
for ign in ignore:
if ign.startswith('!'):
self.ignore.append(ign)
continue
if ign.startswith('*/'):
self.ignore.append(ign)
continue
newign = f'*/{ign}'
self.log.dbg(f'patching ignore {ign} to {newign}')
self.ignore.append(newign)
self.templater = Templategen(variables=self.variables,
base=self.dotpath,