diff options
author | Araq <rumpf_a@web.de> | 2017-02-12 19:39:23 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-02-12 19:39:23 +0100 |
commit | 667acb06a53a47f47dde29c381df0d4bcbf61b94 (patch) | |
tree | 5b717331234b8081c141f30078e43b955a732f1e /tools | |
parent | b053ded266db3b0e1c257a20bf78380749892e37 (diff) | |
download | Nim-667acb06a53a47f47dde29c381df0d4bcbf61b94.tar.gz |
downloader.nim: use new downloadFile proc
Diffstat (limited to 'tools')
-rw-r--r-- | tools/downloader.nim | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/downloader.nim b/tools/downloader.nim index 48331e97a..3d866f5d7 100644 --- a/tools/downloader.nim +++ b/tools/downloader.nim @@ -36,10 +36,7 @@ proc download(pkg: string; c: Controls) {.async.} = c.bar.value = clamp(int(progress*100 div total), 0, 100) client.onProgressChanged = onProgressChanged - # XXX give a destination filename instead - let contents = await client.getContent("https://nim-lang.org/download/" & pkg & ".7z") - # XXX make this async somehow: - writeFile(z, contents) + await client.downloadFile("https://nim-lang.org/download/" & pkg & ".7z", z) c.bar.value = 100 let p = osproc.startProcess("7zG.exe", getCurrentDir() / r"..\dist", ["x", pkg & ".7z"]) |