Changeset 16621
- Timestamp:
- 11/30/2010 07:11:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/misc.php
r16570 r16621 578 578 */ 579 579 580 581 582 583 584 585 586 587 588 589 590 591 592 580 if ( $path[strlen($path)-1] == '/' ) // recursively return a temporary file path 581 return win_is_writable($path . uniqid(mt_rand()) . '.tmp'); 582 else if ( is_dir($path) ) 583 return win_is_writable($path . '/' . uniqid(mt_rand()) . '.tmp'); 584 // check tmp file for read/write capabilities 585 $rm = file_exists($path); 586 $f = @fopen($path, 'a'); 587 if ($f===false) 588 return false; 589 fclose($f); 590 if ( ! $rm ) 591 unlink($path); 592 return true; 593 593 } 594 594
Note: See TracChangeset
for help on using the changeset viewer.