mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 02:16:29 +03:00
fixed logging, removed one more "old" style logging
This commit is contained in:
@@ -1259,8 +1259,6 @@ pub unsafe fn dc_write_file(
|
||||
let mut success = 0;
|
||||
let pathNfilename_abs = dc_get_abs_path(context, pathNfilename);
|
||||
|
||||
info!(context, 0, "trying to write file {:?}", pathNfilename);
|
||||
|
||||
if pathNfilename_abs.is_null() {
|
||||
return 0;
|
||||
}
|
||||
@@ -1273,15 +1271,17 @@ pub unsafe fn dc_write_file(
|
||||
|
||||
match fs::write(p, bytes) {
|
||||
Ok(_) => {
|
||||
info!(context, 0, "wrote file {}", as_str(pathNfilename));
|
||||
|
||||
success = 1;
|
||||
}
|
||||
Err(_err) => {
|
||||
dc_log_warning(
|
||||
warn!(
|
||||
context,
|
||||
0i32,
|
||||
b"Cannot write %lu bytes to \"%s\".\x00" as *const u8 as *const libc::c_char,
|
||||
buf_bytes as libc::c_ulong,
|
||||
pathNfilename,
|
||||
0,
|
||||
"Cannot write {} bytes to \"{}\".",
|
||||
buf_bytes,
|
||||
as_str(pathNfilename),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user