mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +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,
|
||||
);
|
||||
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() {
|
||||
*ret_file_name_as_sent = dc_strdup(filename_to_send)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user