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