Changeset 35644
- Timestamp:
- 11/16/2015 05:32:32 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r35579 r35644 165 165 } 166 166 167 // Suffix some random data to avoid filename conflicts 168 $temp_filename .= '-' . wp_generate_password( 6, false ); 167 169 $temp_filename .= '.tmp'; 168 170 $temp_filename = $dir . wp_unique_filename( $dir, $temp_filename ); 169 touch( $temp_filename ); 171 172 $fp = @fopen( $temp_filename, 'x' ); 173 if ( ! $fp && is_writable( $dir ) && file_exists( $temp_filename ) ) { 174 return wp_tempnam( $filename, $dir ); 175 } 176 if ( $fp ) { 177 fclose( $fp ); 178 } 170 179 171 180 return $temp_filename;
Note: See TracChangeset
for help on using the changeset viewer.