summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-08 00:45:21 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-08 00:45:21 +0200
commit4dc06183aa67ba1911562719c97f41c6a9529075 (patch)
tree8c40d9b0a8e0e7e501811d2727219241e6393efe
parentd007243f15002bac68291fc7e8acbe6303f81a78 (diff)
Fixed bug with recursive deletes in delete_dir()
http://codeigniter.com/bug_tracker/bug/4215/
-rw-r--r--system/libraries/Ftp.php6
-rw-r--r--user_guide/changelog.html1
2 files changed, 4 insertions, 3 deletions
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 1b5ec2fd2..74b7728fa 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -379,15 +379,15 @@ class CI_FTP {
$list = $this->list_files($filepath);
- if ($list !== FALSE AND count($list) > 0)
+ if ($list !== FALSE)
{
foreach ($list as $item)
{
// If we can't delete the item it's probaly a folder so
// we'll recursively call delete_dir()
- if (! @ftp_delete($this->conn_id, $filepath.$item))
+ if (! @ftp_delete($this->conn_id, $item))
{
- $this->delete_dir($filepath.$item);
+ $this->delete_dir($item);
}
}
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 351e1e85e..ea14a3961 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -115,6 +115,7 @@ SVN Commit: not currently released</p>
<li>Fixed an incorrect documentation of $this-&gt;load-&gt;language (#3520).</li>
<li>Fixed an AR_caching error where it wasn't tracking table aliases (#3463).</li>
<li>Fixed an AR bug with or_where_not_in() (#4171).</li>
+ <li>Fixed a bug in the FTP library where delete_dir() was not working recursively (#4215).</li>
<li>Fixed an AR bug when joining with a table alias and table prefix (#4400).</li>
<li>Fixed a bug in DB Forge, when inserting an id field (#3456).</li>
<li>Fixed a bug in the DB class testing the $params argument.</li>