Make WordPress Core


Ignore:
Timestamp:
10/15/2013 07:13:33 PM (12 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/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 );
Note: See TracChangeset for help on using the changeset viewer.