os: fix early termination when saving binary (#5646)
parent
37f31da6c9
commit
95696559b7
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue