plone / bobtemplates.plone

Python Code Templates for Plone Projects with mr.bob
https://pypi.org/project/bobtemplates.plone/
GNU General Public License v2.0
24 stars 31 forks source link

Subtemplates are not working properly on windows #531

Closed me-kell closed 1 year ago

me-kell commented 1 year ago

Subtemplates are not working properly on windows due to a wrong path calculation.

The function bobtemplates.plone.base. base_prepare_renderer uses / to split paths. Paths on windows use \ and are not splitted. Resulting in wrong paths and failing to generate the templates.

https://github.com/plone/bobtemplates.plone/blob/9bf1efef7c735ecec99d6e195aa5b10fa0e3dbfa/bobtemplates/plone/base.py#L437

The solution is to replace / by os.path.sep

This has already been reported on https://github.com/plone/bobtemplates.plone/issues/510#issue-1315957061.

I can confirm this solves the problem in Plone-5.2.x and Plone-6.0.0rc1!

Any chance to get this fixed for Plone-6.0.0rc2?