fixed logging, removed one more "old" style logging

This commit is contained in:
holger krekel
2019-07-04 11:16:15 +02:00
parent a2eb215fdf
commit 6e13e177f7

View File

@@ -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),
);
}
}