Genshi absolute path includes
1 July 2008
09:46
as Diff
| 1 | Index: genshi/template/loader.py |
|---|---|
| 2 | =================================================================== |
| 3 | --- genshi/template/loader.py (revision 893) |
| 4 | +++ genshi/template/loader.py (working copy) |
| 5 | @@ -163,7 +163,9 @@ |
| 6 | """ |
| 7 | if cls is None: |
| 8 | cls = self.default_class |
| 9 | - if relative_to and not os.path.isabs(relative_to): |
| 10 | + |
| 11 | + search_path = self.search_path |
| 12 | + if relative_to and (not search_path or not os.path.isabs(relative_to)): |
| 13 | filename = os.path.join(os.path.dirname(relative_to), filename) |
| 14 | filename = os.path.normpath(filename) |
| 15 | cachekey = filename |
| 16 | @@ -181,7 +183,6 @@ |
| 17 | except (KeyError, OSError): |
| 18 | pass |
| 19 | |
| 20 | - search_path = self.search_path |
| 21 | isabs = False |
| 22 | |
| 23 | if os.path.isabs(filename): |
Comments
No comments so far.
