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

git-svn-id: http://svn.automattic.com/wordpress/trunk@16623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nbachiyski 2010-11-30 19:57:39 +00:00
parent ce7bc3977b
commit 54886235ab
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}