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

keep dotpath as a relative path when importing

This commit is contained in:
deadc0de6
2017-04-18 12:32:58 +02:00
parent 2c052f8b97
commit d25ad19ec2
8 changed files with 43 additions and 24 deletions

View File

@@ -43,9 +43,9 @@ class Templategen:
return self._handle_text_file(src, profile)
def _handle_text_file(self, src, profile):
l = len(self.base) + 1
length = len(self.base) + 1
try:
template = self.env.get_template(src[l:])
template = self.env.get_template(src[length:])
content = template.render(profile=profile)
except UnicodeDecodeError:
data = self._read_bad_encoded_text(src)