From d57a0296d632121e101d5792bd5684da3d00f998 Mon Sep 17 00:00:00 2001 From: messju Date: Sat, 10 May 2003 12:46:17 +0000 Subject: [PATCH] fixed windows absolute-paths in smarty_core_create_dir_structure() --- libs/plugins/core.create_dir_structure.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/plugins/core.create_dir_structure.php b/libs/plugins/core.create_dir_structure.php index 64a1b0de..c07eecc6 100644 --- a/libs/plugins/core.create_dir_structure.php +++ b/libs/plugins/core.create_dir_structure.php @@ -16,8 +16,8 @@ function smarty_core_create_dir_structure($params, &$this) { if (!file_exists($params['dir'])) { - $_new_dir = (preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $params['dir'])) - ? DIRECTORY_SEPARATOR : getcwd().DIRECTORY_SEPARATOR; + $_new_dir = (preg_match("/^(([\/\\\\])|[a-zA-Z]:[\/\\\\])/", $params['dir'], $_root_dir)) + ? $_root_dir[2] : getcwd().DIRECTORY_SEPARATOR; $_dir_parts = preg_split('!\\' . DIRECTORY_SEPARATOR . '+!', $params['dir'], -1, PREG_SPLIT_NO_EMPTY);