diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-06-21 18:46:05 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-06-21 18:46:05 +0000 |
commit | 3fb1a78862af6590948e24c883c203f085838aff (patch) | |
tree | 74d50b98128f5c4053ba41216aa67ce5b605275a /etc | |
parent | 304b3a7d96a7f76e4f016c0b9974813b90ec1ca9 (diff) | |
download | pfsense-3fb1a78862af6590948e24c883c203f085838aff.zip pfsense-3fb1a78862af6590948e24c883c203f085838aff.tar.gz |
Really mkdir... honest.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 9 |
1 files changed, 4 insertions, 5 deletions
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); } /* |