improved path splitting for win32 systems
authorArmin Ronacher <armin.ronacher@active-4.com>
Sun, 9 Dec 2007 20:51:27 +0000 (21:51 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Sun, 9 Dec 2007 20:51:27 +0000 (21:51 +0100)
--HG--
branch : trunk

jinja/loaders.py

index 09f7dda3cf9b6e716d3a1b4601994ea312ca74e5..b76df4ffa105f0187b9e3a1b378747bac77d1d9b 100644 (file)
@@ -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] != '.'])