summaryrefslogtreecommitdiffstats
path: root/system/libraries/Ftp.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-04-09 22:45:02 +0200
committerAndrey Andreev <narf@devilix.net>2014-04-09 22:45:02 +0200
commit72daa197768f5ff86e009ff7afc171da21adc8db (patch)
treefb967fef64901410d163644fe76754febdb644c6 /system/libraries/Ftp.php
parente6942ae3963481b1cf2d98f340691a58a32e910a (diff)
Really fix #2997
Diffstat (limited to 'system/libraries/Ftp.php')
-rw-r--r--system/libraries/Ftp.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 5a856f158..587b6c290 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -477,7 +477,7 @@ class CI_FTP {
{
// If we can't delete the item it's probaly a directory,
// so we'll recursively call delete_dir()
- if ( ! in_array($list[$i], array('.', '..'), TRUE) && ! @ftp_delete($this->conn_id, $list[$i]))
+ if ( ! preg_match('#/\.\.?$#', $list[$i]) && ! @ftp_delete($this->conn_id, $list[$i]))
{
$this->delete_dir($list[$i]);
}