diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index e8fb7a6951..bfd32ec899 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -1707,7 +1707,7 @@ function _unzip_file_ziparchive( $file, $to, $needed_dirs = array() ) { foreach ( $needed_dirs as $_dir ) { // Only check to see if the Dir exists upon creation failure. Less I/O this way. if ( ! $wp_filesystem->mkdir( $_dir, FS_CHMOD_DIR ) && ! $wp_filesystem->is_dir( $_dir ) ) { - return new WP_Error( 'mkdir_failed_ziparchive', __( 'Could not create directory.' ), substr( $_dir, strlen( $to ) ) ); + return new WP_Error( 'mkdir_failed_ziparchive', __( 'Could not create directory.' ), $_dir ); } } unset( $needed_dirs ); @@ -1848,7 +1848,7 @@ function _unzip_file_pclzip( $file, $to, $needed_dirs = array() ) { foreach ( $needed_dirs as $_dir ) { // Only check to see if the dir exists upon creation failure. Less I/O this way. if ( ! $wp_filesystem->mkdir( $_dir, FS_CHMOD_DIR ) && ! $wp_filesystem->is_dir( $_dir ) ) { - return new WP_Error( 'mkdir_failed_pclzip', __( 'Could not create directory.' ), substr( $_dir, strlen( $to ) ) ); + return new WP_Error( 'mkdir_failed_pclzip', __( 'Could not create directory.' ), $_dir ); } } unset( $needed_dirs ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 008d2663a5..f785c1a19c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta3-54441'; +$wp_version = '6.1-beta3-54442'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.