Made a small error trapping change to the delete_directory function
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 6a957a1..0e3dd5e 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -379,7 +379,7 @@
 		

 		$list = $this->list_files($filepath);

 		

-		if ($list !== FALSE)

+		if ($list !== FALSE AND count($list) > 0)

 		{

 			foreach ($list as $item)

 			{