--- smartytemplate.php.orig	2005-12-31 10:24:02.000000000 +0100
+++ smartytemplate.php	2006-08-29 23:52:11.935077800 +0200
@@ -143,7 +143,7 @@ class SmartyTemplate extends Smarty {
    * If unable to create it will stop execution and direct user to permissions setup
    */
   function _get_compile_dir($path) {
-    $dir = ENGINE_PATH.'/templates_c/'.substr(strrchr($path, '/'), 1);
+    $dir = ENGINE_PATH.'/templates_c/'.substr(strrchr(conf_path(), '/'), 1).'_'.substr(strrchr($path, '/'), 1);
     if (!file_exists($dir)) {
       if (!@mkdir($dir)) {
         _test_permissions(true);
