|
@@ 711-712 (lines=2) @@
|
| 708 |
|
if ( false === $contents ) |
| 709 |
|
return new WP_Error( 'extract_failed_ziparchive', __( 'Could not extract file from archive.' ), $info['name'] ); |
| 710 |
|
|
| 711 |
|
if ( ! $wp_filesystem->put_contents( $to . $info['name'], $contents, FS_CHMOD_FILE) ) |
| 712 |
|
return new WP_Error( 'copy_failed_ziparchive', __( 'Could not copy file.' ), $info['name'] ); |
| 713 |
|
} |
| 714 |
|
|
| 715 |
|
$z->close(); |
|
@@ 810-811 (lines=2) @@
|
| 807 |
|
if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files |
| 808 |
|
continue; |
| 809 |
|
|
| 810 |
|
if ( ! $wp_filesystem->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) ) |
| 811 |
|
return new WP_Error( 'copy_failed_pclzip', __( 'Could not copy file.' ), $file['filename'] ); |
| 812 |
|
} |
| 813 |
|
return true; |
| 814 |
|
} |