WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/15/2013 07:13:33 PM (6 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.