@@ 689-694 (lines=6) @@ | ||
686 | asort($needed_dirs); |
|
687 | ||
688 | // Create those directories if need be: |
|
689 | foreach ( $needed_dirs as $_dir ) { |
|
690 | // Only check to see if the Dir exists upon creation failure. Less I/O this way. |
|
691 | if ( ! $wp_filesystem->mkdir( $_dir, FS_CHMOD_DIR ) && ! $wp_filesystem->is_dir( $_dir ) ) { |
|
692 | return new WP_Error( 'mkdir_failed_ziparchive', __( 'Could not create directory.' ), substr( $_dir, strlen( $to ) ) ); |
|
693 | } |
|
694 | } |
|
695 | unset($needed_dirs); |
|
696 | ||
697 | for ( $i = 0; $i < $z->numFiles; $i++ ) { |
|
@@ 795-799 (lines=5) @@ | ||
792 | asort($needed_dirs); |
|
793 | ||
794 | // Create those directories if need be: |
|
795 | foreach ( $needed_dirs as $_dir ) { |
|
796 | // Only check to see if the dir exists upon creation failure. Less I/O this way. |
|
797 | if ( ! $wp_filesystem->mkdir( $_dir, FS_CHMOD_DIR ) && ! $wp_filesystem->is_dir( $_dir ) ) |
|
798 | return new WP_Error( 'mkdir_failed_pclzip', __( 'Could not create directory.' ), substr( $_dir, strlen( $to ) ) ); |
|
799 | } |
|
800 | unset($needed_dirs); |
|
801 | ||
802 | // Extract the files from the zip |