cvs: smarty /libs/plugins core.create_dir_structure.php
| From: | Messju Mohr | Date: | Sat, 10 May 2003 12:46:17 +0000 |
| Subject: | cvs: smarty /libs/plugins core.create_dir_structure.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-602@lists.php.net to get a copy of this message | ||
messju Sat May 10 08:46:17 2003 EDT
Modified files:
/smarty/libs/plugins core.create_dir_structure.php
Log:
fixed windows absolute-paths in smarty_core_create_dir_structure()
Index: smarty/libs/plugins/core.create_dir_structure.php
diff -u smarty/libs/plugins/core.create_dir_structure.php:1.2
smarty/libs/plugins/core.create_dir_structure.php:1.3
--- smarty/libs/plugins/core.create_dir_structure.php:1.2 Sat May 10 06:29:05 2003
+++ smarty/libs/plugins/core.create_dir_structure.php Sat May 10 08:46:17 2003
@@ -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);