From 6e13e177f7fbdc9f6c4959ce5b97abdbab647132 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 4 Jul 2019 11:16:15 +0200 Subject: [PATCH] fixed logging, removed one more "old" style logging --- src/dc_tools.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dc_tools.rs b/src/dc_tools.rs index 738639c4a..8dad0cb9c 100644 --- a/src/dc_tools.rs +++ b/src/dc_tools.rs @@ -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), ); } }