WordPress.org

Make WordPress Core

Changeset 25793


Ignore:
Timestamp:
10/15/13 19:13:33 (3 years ago)
Author:
nacin
Message:

Use FS_CHMOD_FILE rather than an explicit 0644 in copy_dir() and _copy_dir().

This occurs when we can't copy a file. We chmod it and try again.

see #22704.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r25780 r25793  
    790790            if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) { 
    791791                // If copy failed, chmod file to 0644 and try again. 
    792                 $wp_filesystem->chmod($to . $filename, 0644); 
     792                $wp_filesystem->chmod( $to . $filename, FS_CHMOD_FILE ); 
    793793                if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) 
    794794                    return new WP_Error( 'copy_failed_copy_dir', __( 'Could not copy file.' ), $to . $filename ); 
  • trunk/src/wp-admin/includes/update-core.php

    r25780 r25793  
    901901            if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) { 
    902902                // If copy failed, chmod file to 0644 and try again. 
    903                 $wp_filesystem->chmod($to . $filename, 0644); 
     903                $wp_filesystem->chmod( $to . $filename, FS_CHMOD_FILE ); 
    904904                if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) 
    905905                    return new WP_Error( 'copy_failed__copy_dir', __( 'Could not copy file.' ), $to . $filename ); 
Note: See TracChangeset for help on using the changeset viewer.