From: Armin Ronacher Date: Sun, 9 Dec 2007 20:51:27 +0000 (+0100) Subject: improved path splitting for win32 systems X-Git-Tag: 2.0rc1~225 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=618027969e2582da998407214e3437a6687e25b6;p=jinja2.git improved path splitting for win32 systems --HG-- branch : trunk --- diff --git a/jinja/loaders.py b/jinja/loaders.py index 09f7dda..b76df4f 100644 --- a/jinja/loaders.py +++ b/jinja/loaders.py @@ -33,6 +33,9 @@ def get_template_filename(searchpath, name): """ Return the filesystem filename wanted. """ + for sep in path.sep, path.altsep: + if sep and sep in name: + name = name.replace(sep, '/') return path.join(searchpath, *[p for p in name.split('/') if p and p[0] != '.'])