summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/downloader.nim9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/downloader.nim b/tools/downloader.nim
index 9b7f4a129..dc7b636aa 100644
--- a/tools/downloader.nim
+++ b/tools/downloader.nim
@@ -27,8 +27,13 @@ proc download(pkg: string; c: Controls) {.async.} =
   # XXX make this async somehow:
   writeFile(z, contents)
   c.bar.value = 100
-  if os.execShellCmd("7zG x " & z) != 0:
-    c.lab.text = "Unpacking failed: " & z
+  let olddir = getCurrentDir()
+  try:
+    setCurrentDir(olddir  / "dist")
+    if os.execShellCmd("bin\\7zG.exe x " & pkg & ".zip") != 0:
+      c.lab.text = "Unpacking failed: " & z
+  finally:
+    setCurrentdir(olddir)
 
   when false:
     var a: ZipArchive