From d0519602a7003cdf823aae30dd26e4b11d5b3d0c Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 3 Nov 2008 17:16:41 +0000 Subject: [PATCH] IF copy fails, chmod target to 0644 and try again git-svn-id: http://svn.automattic.com/wordpress/trunk@9493 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/file.php | 8 ++++++-- wp-admin/wp-admin.css | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 68dca1a075..f9ac5fb434 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -542,8 +542,12 @@ function copy_dir($from, $to) { foreach ( (array) $dirlist as $filename => $fileinfo ) { if ( 'f' == $fileinfo['type'] ) { - if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) - return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename); + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) { + // If copy failed, chmod file to 0644 and try again. + $wp_filesystem->chmod($to . $filename, 0644); + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) + 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->is_dir($to . $filename) ) { diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 097bea5692..470dd08b51 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -1290,6 +1290,10 @@ table.form-table td .updated { /* Post Screen */ +#normal-sortables { + min-height: 50px; +} + .postbox { position: relative; min-width: 255px;