diff options
author | 2016-10-31 15:28:10 -0400 | |
---|---|---|
committer | 2016-10-31 20:01:33 +0000 | |
commit | 18b84900855bb34f1694b4c50c088e7377d0e89f (patch) | |
tree | 3941f0c7438ac7d721692f6270b2ced6357a20a5 /infra | |
parent | 09d9435835f48b06954904f16d14c1c2eeaaad2e (diff) |
Always write files in binary mode when unzipping
Prevents CRLF conversion on Windows, which was corrupting SKP files
downloaded with fetch-skps
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4210
Change-Id: Ia876f403d10792ee185d50a29fe30402b733441d
Reviewed-on: https://skia-review.googlesource.com/4210
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'infra')
-rw-r--r-- | infra/bots/zip_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/infra/bots/zip_utils.py b/infra/bots/zip_utils.py index ed1979d804..3d25c71e3d 100644 --- a/infra/bots/zip_utils.py +++ b/infra/bots/zip_utils.py @@ -55,7 +55,7 @@ def unzip(zip_file, target_dir): if zi.filename.endswith('/'): os.mkdir(dst_path) else: - with open(dst_path, 'w') as f: + with open(dst_path, 'wb') as f: f.write(z.read(zi)) perms = zi.external_attr >> 16L os.chmod(dst_path, perms) |