Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0b8298e

Browse files
committedNov 14, 2011
Fix #13415 ( cloning issue with attachments doesn't work )
Thanks to adminactoll for providing the patch.
1 parent c2746c5 commit 0b8298e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎core/file_api.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -870,11 +870,11 @@ function file_copy_attachments( $p_source_bug_id, $p_dest_bug_id ) {
870870
$t_bug_file = db_fetch_array( $result );
871871

872872
# prepare the new diskfile name and then copy the file
873-
$t_file_path = dirname( $t_bug_file['folder'] );
873+
$t_file_path = $t_bug_file['folder'];
874874
$t_new_diskfile_name = $t_file_path . file_generate_unique_name( 'bug-' . $t_bug_file['filename'], $t_file_path );
875875
$t_new_file_name = file_get_display_name( $t_bug_file['filename'] );
876876
if(( config_get( 'file_upload_method' ) == DISK ) ) {
877-
copy( $t_bug_file['diskfile'], $t_new_diskfile_name );
877+
copy( $t_file_path.$t_bug_file['diskfile'], $t_new_diskfile_name );
878878
chmod( $t_new_diskfile_name, config_get( 'attachments_file_permissions' ) );
879879
}
880880

0 commit comments

Comments
 (0)
Please sign in to comment.