File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -871,11 +871,12 @@ function file_copy_attachments( $p_source_bug_id, $p_dest_bug_id ) {
871
871
872
872
# prepare the new diskfile name and then copy the file
873
873
$ t_file_path = $ t_bug_file ['folder ' ];
874
- $ t_new_diskfile_name = $ t_file_path . file_generate_unique_name ( 'bug- ' . $ t_bug_file ['filename ' ], $ t_file_path );
874
+ $ t_new_diskfile_name = file_generate_unique_name ( 'bug- ' . $ t_bug_file ['filename ' ], $ t_file_path );
875
+ $ t_new_diskfile_location = $ t_file_path . $ t_new_diskfile_name ;
875
876
$ t_new_file_name = file_get_display_name ( $ t_bug_file ['filename ' ] );
876
877
if (( config_get ( 'file_upload_method ' ) == DISK ) ) {
877
- copy ( $ t_file_path .$ t_bug_file ['diskfile ' ], $ t_new_diskfile_name );
878
- chmod ( $ t_new_diskfile_name , config_get ( 'attachments_file_permissions ' ) );
878
+ copy ( $ t_file_path .$ t_bug_file ['diskfile ' ], $ t_new_diskfile_location );
879
+ chmod ( $ t_new_diskfile_location , config_get ( 'attachments_file_permissions ' ) );
879
880
}
880
881
881
882
$ query = "INSERT INTO $ t_mantis_bug_file_table
You can’t perform that action at this time.
0 commit comments