Rename the $rm variable so that the logic in win_is_writable() makes more sense
git-svn-id: https://develop.svn.wordpress.org/trunk@16623 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8a45977efc
commit
757aeb2121
@ -567,7 +567,7 @@ function saveDomDocument($doc, $filename) {
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param object $path
|
||||
* @param string $path
|
||||
* @return bool
|
||||
*/
|
||||
function win_is_writable( $path ) {
|
||||
@ -582,12 +582,12 @@ function win_is_writable( $path ) {
|
||||
else if ( is_dir( $path ) )
|
||||
return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
|
||||
// check tmp file for read/write capabilities
|
||||
$rm = file_exists( $path );
|
||||
$should_delete_tmp_file = !file_exists( $path );
|
||||
$f = @fopen( $path, 'a' );
|
||||
if ( $f === false )
|
||||
return false;
|
||||
fclose( $f );
|
||||
if ( ! $rm )
|
||||
if ( $should_delete_tmp_file )
|
||||
unlink( $path );
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user