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
This commit is contained in:
parent
de3e6af863
commit
d0519602a7
|
@ -542,8 +542,12 @@ function copy_dir($from, $to) {
|
||||||
|
|
||||||
foreach ( (array) $dirlist as $filename => $fileinfo ) {
|
foreach ( (array) $dirlist as $filename => $fileinfo ) {
|
||||||
if ( 'f' == $fileinfo['type'] ) {
|
if ( 'f' == $fileinfo['type'] ) {
|
||||||
if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) )
|
if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) {
|
||||||
return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename);
|
// 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);
|
$wp_filesystem->chmod($to . $filename, 0644);
|
||||||
} elseif ( 'd' == $fileinfo['type'] ) {
|
} elseif ( 'd' == $fileinfo['type'] ) {
|
||||||
if ( !$wp_filesystem->is_dir($to . $filename) ) {
|
if ( !$wp_filesystem->is_dir($to . $filename) ) {
|
||||||
|
|
|
@ -1290,6 +1290,10 @@ table.form-table td .updated {
|
||||||
|
|
||||||
/* Post Screen */
|
/* Post Screen */
|
||||||
|
|
||||||
|
#normal-sortables {
|
||||||
|
min-height: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
.postbox {
|
.postbox {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-width: 255px;
|
min-width: 255px;
|
||||||
|
|
Loading…
Reference in New Issue