Index: wp-admin/includes/class-wp-filesystem-direct.php
===================================================================
--- wp-admin/includes/class-wp-filesystem-direct.php	(revision 6918)
+++ wp-admin/includes/class-wp-filesystem-direct.php	(working copy)
@@ -2,7 +2,9 @@
 
 class WP_Filesystem_Direct{
 	var $permission = null;
+	var $errors = array();
 	function WP_Filesystem_Direct($arg){
+		$this->errors = new WP_Error();
 		$this->permission = umask();
 	}
 	function connect(){
@@ -174,7 +176,7 @@
 		if( $overwrite && $this->exists($destination) )
 			return false;
 		return copy($source,$destination);
-	}
+	}
 
 	function move($source,$destination,$overwrite=false){
 		//Possible to use rename()
@@ -184,15 +186,20 @@
 		} else {
 			return false;
 		}
-	}
+	}
 
 	function delete($file,$recursive=false){
 		$file = str_replace('\\','/',$file); //for win32, occasional problems deleteing files otherwise
+
 		if( $this->is_file($file) )
 			return @unlink($file);
-		if( !$recursive )
+
+		if( !$recursive && $this->is_dir($file) )
 			return @rmdir($file);
+
 		$filelist = $this->dirlist($file);
+		if( ! $filelist )
+			return true; //No files exist, Say we've deleted them
 
 		$retval = true;
 		foreach($filelist as $filename=>$fileinfo){
@@ -206,19 +213,19 @@
 	
 	function exists($file){
 		return @file_exists($file);
-	}
+	}
 
 	function is_file($file){
 		return @is_file($file);
-	}
+	}
 
 	function is_dir($path){
 		return @is_dir($path);
-	}
+	}
 
 	function is_readable($file){
 			return @is_readable($file);
-	}
+	}
 
 	function is_writable($file){
 		return @is_writable($file);
@@ -226,14 +233,14 @@
 	
 	function atime($file){
 		return @fileatime($file);
-	}
+	}
 
 	function mtime($file){
 		return @filemtime($file);
 	}
 	function size($file){
 		return @filesize($file);
-	}
+	}
 
 	function touch($file,$time=0,$atime=0){
 		if($time==0)
@@ -254,7 +261,7 @@
 		if( $chgrp )
 			$this->chgrp($path,$chgrp);
 		return true;
-	}
+	}
 
 	function rmdir($path,$recursive=false){
 		if( ! $recursive )
@@ -320,7 +327,7 @@
 		$dir->close();
 		unset($dir);
 		return $ret;
-	}
+	}
 
 	function __destruct(){
 		return;
Index: wp-admin/includes/update.php
===================================================================
--- wp-admin/includes/update.php	(revision 6918)
+++ wp-admin/includes/update.php	(working copy)
@@ -178,7 +178,7 @@
 	$plugin_dir = dirname(ABSPATH . PLUGINDIR . "/$plugin");
 
 	// If plugin is in its own directory, recursively delete the directory.
-	if ( '.' != $plugin_dir )
+	if ( '.' != $plugin_dir && ABSPATH . PLUGINDIR != $plugin_dir )
 		$wp_filesystem->delete($plugin_dir, true);
 
 	apply_filters('update_feedback', __("Installing the latest version"));

