Changeset 25869
- Timestamp:
- 10/22/2013 06:17:13 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/file.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r25831 r25869 623 623 * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. 624 624 */ 625 $available_space = @disk_free_space( WP_CONTENT_DIR ); 626 if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) 627 return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); 625 if ( defined( 'DOING_CRON' ) && DOING_CRON ) { 626 $available_space = @disk_free_space( WP_CONTENT_DIR ); 627 if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) 628 return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); 629 } 628 630 629 631 $needed_dirs = array_unique($needed_dirs); … … 723 725 * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. 724 726 */ 725 $available_space = @disk_free_space( WP_CONTENT_DIR ); 726 if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) 727 return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); 727 if ( defined( 'DOING_CRON' ) && DOING_CRON ) { 728 $available_space = @disk_free_space( WP_CONTENT_DIR ); 729 if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) 730 return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); 731 } 728 732 729 733 $needed_dirs = array_unique($needed_dirs);
Note: See TracChangeset
for help on using the changeset viewer.