diff options
author | Colin Smith <colin@pfsense.org> | 2005-06-21 19:45:39 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-06-21 19:45:39 +0000 |
commit | 27273870c1d65ea4aa4ffc497338f6cfbf0c35f4 (patch) | |
tree | b844e4d0c975f65f98cf6d9ebd5c2cba4217ad4e | |
parent | 29f9dd5216360cb878f16c3d51f819f237feef72 (diff) | |
download | pfsense-27273870c1d65ea4aa4ffc497338f6cfbf0c35f4.zip pfsense-27273870c1d65ea4aa4ffc497338f6cfbf0c35f4.tar.gz |
Try fixing make_dirs and friends.
-rw-r--r-- | etc/inc/pfsense-utils.inc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 7040a97..4e2bd82 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -824,11 +824,11 @@ function safe_mkdir($path, $mode=0755) { /* cdrom is ro. */ if($g['platform'] == "cdrom") return false; - - if(is_dir($path)) - return; - - make_dirs($path, $mode); + + if (!is_file($path) && !is_dir($path)) + return mkdir($path, $mode); + else + return false; } /* @@ -839,10 +839,10 @@ function make_dirs($path, $mode = 0755) { /* is dir already created? */ if(is_dir($path)) return; /* create directory in question */ - $to_create = split("/", $path); + $to_create = explode("/", $path); foreach($to_create as $tc) if(!is_dir($tc)) - make_dirs($path, $mode); + safe_mkdir($path, $mode); } /* |