From 742f09dbc708026bf59a82e623527b04e1eb5b96 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 5 May 2008 17:06:29 +0000 Subject: [PATCH] Use full path to fs abstraction class. Props DD32. fixes #6912 git-svn-id: http://svn.automattic.com/wordpress/trunk@7895 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/file.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index a7c8228a03..a222b40bda 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -313,10 +313,15 @@ function WP_Filesystem( $args = false ) { global $wp_filesystem; $method = get_filesystem_method(); + if ( ! $method ) return false; - require_once('class-wp-filesystem-'.$method.'.php'); + $abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-'.$method.'.php', $method); + if( ! file_exists($abstraction_file) ) + return; + + require_once($abstraction_file); $method = "WP_Filesystem_$method"; $wp_filesystem = new $method($args);