mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 17:06:35 +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 mut success = 0;
|
||||||
let pathNfilename_abs = dc_get_abs_path(context, pathNfilename);
|
let pathNfilename_abs = dc_get_abs_path(context, pathNfilename);
|
||||||
|
|
||||||
info!(context, 0, "trying to write file {:?}", pathNfilename);
|
|
||||||
|
|
||||||
if pathNfilename_abs.is_null() {
|
if pathNfilename_abs.is_null() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1273,15 +1271,17 @@ pub unsafe fn dc_write_file(
|
|||||||
|
|
||||||
match fs::write(p, bytes) {
|
match fs::write(p, bytes) {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
|
info!(context, 0, "wrote file {}", as_str(pathNfilename));
|
||||||
|
|
||||||
success = 1;
|
success = 1;
|
||||||
}
|
}
|
||||||
Err(_err) => {
|
Err(_err) => {
|
||||||
dc_log_warning(
|
warn!(
|
||||||
context,
|
context,
|
||||||
0i32,
|
0,
|
||||||
b"Cannot write %lu bytes to \"%s\".\x00" as *const u8 as *const libc::c_char,
|
"Cannot write {} bytes to \"{}\".",
|
||||||
buf_bytes as libc::c_ulong,
|
buf_bytes,
|
||||||
pathNfilename,
|
as_str(pathNfilename),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user