Posted by paddy_deburca on July 15, 2007 at 11:14am
3 followers
| Project: | Drupal core |
| Version: | 6.x-dev |
| Component: | file system |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The code for file_destination() is
function file_destination($destination, $replace) {
if (file_exists($destination)) {
switch ($replace) {
case FILE_EXISTS_RENAME:
$basename = basename($destination);
$directory = dirname($destination);
$destination = file_create_filename($basename, $directory);
break;
case FILE_EXISTS_ERROR:
drupal_set_message(t('The selected file %file could not be copied, because a file by that name already exists in the destination.', array('%file' => $source)), 'error');
return FALSE;
}
}
return $destination;
}however, $source is not previously declared, $destination should be used.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| file_16.patch | 639 bytes | Ignored: Check issue status. | None | None |
Comments
#1
#2
Thanks, committed.
#3