Revert "Don't remove one directory level from slspath"

This reverts commit 7c28995a0a.
This commit is contained in:
Daniel A. Wozniak 2020-03-10 00:29:47 +00:00
parent 602ff3b9f1
commit 3d3b673cec
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61

View file

@ -122,6 +122,8 @@ def wrap_tmpl_func(render_str):
slspath = context['sls'].replace('.', '/')
if tmplpath is not None:
context['tplpath'] = tmplpath
if not tmplpath.lower().replace('\\', '/').endswith('/init.sls'):
slspath = os.path.dirname(slspath)
template = tmplpath.replace('\\', '/')
i = template.rfind(slspath.replace('.', '/'))
if i != -1: