mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: fix early termination when saving binary (#5646)
This commit is contained in:
parent
37f31da6c9
commit
95696559b7
@ -6,7 +6,9 @@ module http
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
pub fn download_file(url, out string) bool {
|
pub fn download_file(url, out string) bool {
|
||||||
|
$if debug_http? {
|
||||||
println('download file url=$url out=$out')
|
println('download file url=$url out=$out')
|
||||||
|
}
|
||||||
s := get(url) or {
|
s := get(url) or {
|
||||||
return false
|
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) {
|
pub fn (mut f File) writeln(s string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user