Skip to content

Commit

Permalink
Fix #13415 ( cloning issue with attachments doesn't work )
Browse files Browse the repository at this point in the history
Thanks to adminactoll for providing the patch.
  • Loading branch information
rombert committed Nov 14, 2011
1 parent 4a3268a commit 46873eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/file_api.php
Expand Up @@ -1040,11 +1040,11 @@ function file_copy_attachments( $p_source_bug_id, $p_dest_bug_id ) {
$t_bug_file = db_fetch_array( $result );

# prepare the new diskfile name and then copy the file
$t_file_path = dirname( $t_bug_file['folder'] );
$t_file_path = $t_bug_file['folder'];
$t_new_diskfile_name = $t_file_path . file_generate_unique_name( 'bug-' . $t_bug_file['filename'], $t_file_path );
$t_new_file_name = file_get_display_name( $t_bug_file['filename'] );
if(( config_get( 'file_upload_method' ) == DISK ) ) {
copy( $t_bug_file['diskfile'], $t_new_diskfile_name );
copy( $t_file_path.$t_bug_file['diskfile'], $t_new_diskfile_name );
chmod( $t_new_diskfile_name, config_get( 'attachments_file_permissions' ) );
}

Expand Down

0 comments on commit 46873eb

Please sign in to comment.