From 3fb1a78862af6590948e24c883c203f085838aff Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 21 Jun 2005 18:46:05 +0000 Subject: Really mkdir... honest. --- etc/inc/pfsense-utils.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index bb62602..cf1824b 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -822,8 +822,8 @@ function safe_mkdir($path, $mode=0755) { global $g; if($g['platform'] == "cdrom") - return false;; - + return false; + if (!is_file($path) && !is_dir($path)) return make_dirs($path, $mode); else @@ -834,12 +834,11 @@ function safe_mkdir($path, $mode=0755) { * make_dirs($path, $mode = 0755) * create directory tree recursively (mkdir -p) */ -function make_dirs($path, $mode = 0755) -{ +function make_dirs($path, $mode = 0755) { /* is dir already created? */ if(is_dir($path)) return; /* create directory in question */ - make_dirs(dirname($path), $mode); + mkdir(dirname($path), $mode); } /* -- cgit v1.1