mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 13:56:30 +03:00
Use safe version of dc_get_abs_path.
* src/dc_mimefactory.rs(build_body_file): use safe version of dc_get_abs_path() function.
This commit is contained in:
@@ -1289,7 +1289,12 @@ unsafe fn build_body_file(
|
|||||||
) as *mut libc::c_void,
|
) as *mut libc::c_void,
|
||||||
);
|
);
|
||||||
mime_sub = mailmime_new_empty(content, mime_fields);
|
mime_sub = mailmime_new_empty(content, mime_fields);
|
||||||
mailmime_set_body_file(mime_sub, dc_get_abs_path(context, path_filename));
|
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);
|
||||||
if !ret_file_name_as_sent.is_null() {
|
if !ret_file_name_as_sent.is_null() {
|
||||||
*ret_file_name_as_sent = dc_strdup(filename_to_send)
|
*ret_file_name_as_sent = dc_strdup(filename_to_send)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user