Make WordPress Core

Ticket #30394: patch2

File patch2, 627 bytes (added by hew, 12 years ago)

Slightly less poor man fix

Line 
1Index: wp-admin/includes/image-edit.php
2===================================================================
3--- wp-admin/includes/image-edit.php (revision 108985)
4+++ wp-admin/includes/image-edit.php (working copy)
5@@ -738,7 +738,11 @@
6 if ( $tag )
7 $backup_sizes[$tag] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $path_parts['basename']);
8
9- $success = update_attached_file( $post_id, $new_path );
10+ if ( $path == $new_path ) {
11+ $success = true;
12+ } else {
13+ $success = update_attached_file( $post_id, $new_path );
14+ }
15
16 $meta['file'] = _wp_relative_upload_path( $new_path );
17