From 6b8e9cc3c17dd29dcb9947fc2b794f1e5dea8d34 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 Jan 2006 18:03:28 +0000 Subject: [PATCH] =?UTF-8?q?Traces=20compl=E9mentaire=20sur=20fonction=20cr?= =?UTF-8?q?eate=5Fexdir.=20Utilisation=20de=20is=5Fdir=20au=20lieu=20de=20?= =?UTF-8?q?file=5Fexists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/functions.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 18083391c90..dbdae876465 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1741,6 +1741,8 @@ function get_exdir($num) */ function create_exdir($dir) { + dolibarr_syslog("functions.inc.php::create_exdir dir=$dir"); + $nberr=0; $nbcreated=0; @@ -1753,7 +1755,7 @@ function create_exdir($dir) if (eregi("^.:$",$ccdir,$regs)) continue; // Si chemin Windows incomplet, on poursuit par rep suivant //print "${ccdir}
\n"; - if ($ccdir && ! file_exists($ccdir)) + if ($ccdir && ! is_dir($ccdir)) { umask(0); if (! @mkdir($ccdir, 0755)) @@ -1763,7 +1765,7 @@ function create_exdir($dir) } else { - dolibarr_syslog("functions.inc.php::create_exdir Répertoire '$ccdir' created"); + dolibarr_syslog("functions.inc.php::create_exdir Directory '$ccdir' created"); $nbcreated++; } }