Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix #13415 ( cloning issue with attachments doesn't work )

Thanks to adminactoll for providing the patch.
  • Loading branch information...
commit 0b8298ecdc9902cf7a3fbb68994ff5e0fa20d4ad 1 parent c2746c5
@rombert rombert authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/file_api.php
View
4 core/file_api.php
@@ -870,11 +870,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' ) );
}
Please sign in to comment.
Something went wrong with that request. Please try again.