WordPress.org

Make WordPress Core

Changeset 16623


Ignore:
Timestamp:
11/30/2010 07:57:39 PM (9 years ago)
Author:
nbachiyski
Message:

Rename the $rm variable so that the logic in win_is_writable() makes more sense

File:
1 edited

Legend:

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

    r16622 r16623  
    568568 * @since 2.8.0
    569569 *
    570  * @param object $path
     570 * @param string $path
    571571 * @return bool
    572572 */
     
    583583        return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
    584584    // check tmp file for read/write capabilities
    585     $rm = file_exists( $path );
     585    $should_delete_tmp_file = !file_exists( $path );
    586586    $f = @fopen( $path, 'a' );
    587587    if ( $f === false )
    588588        return false;
    589589    fclose( $f );
    590     if ( ! $rm )
     590    if ( $should_delete_tmp_file )
    591591        unlink( $path );
    592592    return true;
Note: See TracChangeset for help on using the changeset viewer.