Fix #3787
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index af45bb5..b532075 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -490,7 +490,7 @@
 				// so we'll recursively call delete_dir()
 				if ( ! preg_match('#/\.\.?$#', $list[$i]) && ! @ftp_delete($this->conn_id, $list[$i]))
 				{
-					$this->delete_dir($list[$i]);
+					$this->delete_dir($filepath.$list[$i]);
 				}
 			}
 		}