From 72daa197768f5ff86e009ff7afc171da21adc8db Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 9 Apr 2014 23:45:02 +0300 Subject: Really fix #2997 --- system/libraries/Ftp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries/Ftp.php') 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]); } -- cgit v1.2.3-24-g4f1b