[svn] fixed bug with caching into same directory if the searchpath was relative
authorArmin Ronacher <armin.ronacher@active-4.com>
Tue, 8 May 2007 19:50:41 +0000 (21:50 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Tue, 8 May 2007 19:50:41 +0000 (21:50 +0200)
--HG--
branch : trunk

jinja/loaders.py

index 6836b32ea190f4213e7a9149f2b9df07321c2184..0bebdc3e3b7adeba9312416f575b3b96b0fc8996 100644 (file)
@@ -273,9 +273,9 @@ class FileSystemLoader(CachedLoaderMixin, BaseLoader):
 
     def __init__(self, searchpath, use_memcache=False, memcache_size=40,
                  cache_folder=None, auto_reload=True, cache_salt=None):
+        self.searchpath = path.abspath(searchpath)
         if cache_salt is None:
-            cache_salt = searchpath
-        self.searchpath = searchpath
+            cache_salt = self.searchpath
         CachedLoaderMixin.__init__(self, use_memcache, memcache_size,
                                    cache_folder, auto_reload, cache_salt)