Drop unsafe version of dc_get_abs_path

This commit is contained in:
Dmitry Bogatov
2019-09-12 01:33:58 +00:00
parent df47e0ed63
commit f198ce29b1
5 changed files with 16 additions and 39 deletions

View File

@@ -1289,12 +1289,10 @@ unsafe fn build_body_file(
) as *mut libc::c_void,
);
mime_sub = mailmime_new_empty(content, mime_fields);
let abs_path = dc_get_abs_path_safe(context, path_filename)
.as_os_str()
.to_str()
.unwrap()
.strdup();
mailmime_set_body_file(mime_sub, abs_path);
let abs_path = dc_get_abs_path(context, path_filename)
.to_c_string()
.unwrap();
mailmime_set_body_file(mime_sub, dc_strdup(abs_path.as_ptr()));
if !ret_file_name_as_sent.is_null() {
*ret_file_name_as_sent = dc_strdup(filename_to_send)
}