diff --git a/change_log.txt b/change_log.txt index 51fdd5bc..46da0e4f 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,5 +1,6 @@ 04/29/2009 - fixed problem with directory setter methodes +- allow that cache_dir can end without directory separator 04/28/2009 - the {function} tag can no longer overwrite standard smarty tags diff --git a/libs/sysplugins/internal.cacheresource_file.php b/libs/sysplugins/internal.cacheresource_file.php index b79479d9..fccae3e1 100644 --- a/libs/sysplugins/internal.cacheresource_file.php +++ b/libs/sysplugins/internal.cacheresource_file.php @@ -164,8 +164,12 @@ class Smarty_Internal_CacheResource_File extends Smarty_Internal_PluginBase { } else { $_compile_id = ''; } + $_cache_dir = $_template->smarty->cache_dir; + if (substr($_cache_dir, -1) != DIRECTORY_SEPARATOR) { + $_cache_dir .= DIRECTORY_SEPARATOR; + } - return $this->smarty->cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . $resource_name . $this->smarty->php_ext; + return $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . $resource_name . $this->smarty->php_ext; } }