From cf501c21aa3923c326b5f4a04ae72ba63381b2eb Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Fri, 5 Jan 2018 08:55:33 +0100 Subject: [PATCH] strip os.sep --- dotdrop/templategen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotdrop/templategen.py b/dotdrop/templategen.py index e05dce5..010ecba 100644 --- a/dotdrop/templategen.py +++ b/dotdrop/templategen.py @@ -47,7 +47,7 @@ class Templategen: return self._handle_text_file(src, profile) def _handle_text_file(self, src, profile): - template_rel_path = src.split(self.base)[-1] + template_rel_path = src.split(self.base)[-1].lstrip(os.sep) try: template = self.env.get_template(template_rel_path) content = template.render(profile=profile, env=os.environ)