Improve temp file name, props DD32, fixes #10224

git-svn-id: http://svn.automattic.com/wordpress/trunk@11712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-07-14 08:12:18 +00:00
parent b86edde092
commit 7842ab84d9
1 changed files with 1 additions and 0 deletions

View File

@ -171,6 +171,7 @@ function wp_tempnam($filename = '', $dir = ''){
if ( empty($filename) )
$filename = time();
$filename = preg_replace('|\..*$|', '.tmp', $filename);
$filename = $dir . wp_unique_filename($dir, $filename);
touch($filename);
return $filename;