Automatic upgrade, first cut. see #5560
git-svn-id: http://svn.automattic.com/wordpress/trunk@8595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -408,8 +408,10 @@ function copy_dir($from, $to) {
|
||||
return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename);
|
||||
$wp_filesystem->chmod($to . $filename, 0644);
|
||||
} elseif ( 'd' == $fileinfo['type'] ) {
|
||||
if ( !$wp_filesystem->mkdir($to . $filename, 0755) )
|
||||
return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $filename);
|
||||
if ( !$wp_filesystem->is_dir($to . $filename) ) {
|
||||
if ( !$wp_filesystem->mkdir($to . $filename, 0755) )
|
||||
return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $filename);
|
||||
}
|
||||
$result = copy_dir($from . $filename, $to . $filename);
|
||||
if ( is_wp_error($result) )
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user