Skip to content

Commit 46873eb

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

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
@@ -1040,11 +1040,11 @@ function file_copy_attachments( $p_source_bug_id, $p_dest_bug_id ) {
10401040
$t_bug_file = db_fetch_array( $result );
10411041

10421042
# prepare the new diskfile name and then copy the file
1043-
$t_file_path = dirname( $t_bug_file['folder'] );
1043+
$t_file_path = $t_bug_file['folder'];
10441044
$t_new_diskfile_name = $t_file_path . file_generate_unique_name( 'bug-' . $t_bug_file['filename'], $t_file_path );
10451045
$t_new_file_name = file_get_display_name( $t_bug_file['filename'] );
10461046
if(( config_get( 'file_upload_method' ) == DISK ) ) {
1047-
copy( $t_bug_file['diskfile'], $t_new_diskfile_name );
1047+
copy( $t_file_path.$t_bug_file['diskfile'], $t_new_diskfile_name );
10481048
chmod( $t_new_diskfile_name, config_get( 'attachments_file_permissions' ) );
10491049
}
10501050

0 commit comments

Comments
 (0)
Please sign in to comment.