COonvert spaces to tabs
git-svn-id: http://svn.automattic.com/wordpress/trunk@16621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dc7baa81e9
commit
a3d185fd50
|
@ -577,19 +577,19 @@ function win_is_writable($path) {
|
||||||
* see http://bugs.php.net/bug.php?id=30931
|
* see http://bugs.php.net/bug.php?id=30931
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( $path[strlen($path)-1] == '/' ) // recursively return a temporary file path
|
if ( $path[strlen($path)-1] == '/' ) // recursively return a temporary file path
|
||||||
return win_is_writable($path . uniqid(mt_rand()) . '.tmp');
|
return win_is_writable($path . uniqid(mt_rand()) . '.tmp');
|
||||||
else if ( is_dir($path) )
|
else if ( is_dir($path) )
|
||||||
return win_is_writable($path . '/' . uniqid(mt_rand()) . '.tmp');
|
return win_is_writable($path . '/' . uniqid(mt_rand()) . '.tmp');
|
||||||
// check tmp file for read/write capabilities
|
// check tmp file for read/write capabilities
|
||||||
$rm = file_exists($path);
|
$rm = file_exists($path);
|
||||||
$f = @fopen($path, 'a');
|
$f = @fopen($path, 'a');
|
||||||
if ($f===false)
|
if ($f===false)
|
||||||
return false;
|
return false;
|
||||||
fclose($f);
|
fclose($f);
|
||||||
if ( ! $rm )
|
if ( ! $rm )
|
||||||
unlink($path);
|
unlink($path);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue