]> git.lizzy.rs Git - cheatdb.git/commitdiff
Fix creation of corrupt zip files
authorrubenwardy <rw@rubenwardy.com>
Sun, 8 Jul 2018 16:09:46 +0000 (17:09 +0100)
committerrubenwardy <rw@rubenwardy.com>
Sun, 8 Jul 2018 16:10:38 +0000 (17:10 +0100)
Fixes #103

app/tasks/importtasks.py

index 302203fec9562cb23d499c87699f3e387e24f5bf..18ce2e6aa6bf0b786d3e1890dea4b18b227e1acc 100644 (file)
@@ -372,7 +372,7 @@ def makeVCSRelease(id, branch):
                        filename = randomString(10) + ".zip"
                        destPath = os.path.join("app/public/uploads", filename)
                        with open(destPath, "wb") as fp:
-                               repo.archive(fp)
+                               repo.archive(fp, format="zip")
 
                        release.url = "/uploads/" + filename
                        print(release.url)