diff --git a/vlib/net/http/download.v b/vlib/net/http/download.v index cfc8455879..3adcd69c91 100644 --- a/vlib/net/http/download.v +++ b/vlib/net/http/download.v @@ -6,7 +6,9 @@ module http import os pub fn download_file(url, out string) bool { - println('download file url=$url out=$out') + $if debug_http? { + println('download file url=$url out=$out') + } s := get(url) or { return false } diff --git a/vlib/os/os.v b/vlib/os/os.v index 98751a7f7e..f3857d4cfb 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -39,7 +39,7 @@ pub fn (mut f File) write(s string) { } } */ - C.fputs(s.str, f.cfile) + C.fwrite(s.str, s.len, 1, f.cfile) } pub fn (mut f File) writeln(s string) {