Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6129)

Unified Diff: chrome/tools/build/make_zip.py

Issue 2585633002: Fix duplicate name warnings from make_zip, and pass allowZip64. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/build/make_zip.py
diff --git a/chrome/tools/build/make_zip.py b/chrome/tools/build/make_zip.py
index 81e411e19eb4cc75144968dd8da2e766928098ba..17c42dae04d9b6b09b0cae8b11a11a5e5e648085 100755
--- a/chrome/tools/build/make_zip.py
+++ b/chrome/tools/build/make_zip.py
@@ -21,16 +21,16 @@ def main(args):
cwd = os.getcwd()
os.chdir(build_dir)
- files = []
+ files = set()
for file_spec in exec_globals['FILES']:
pattern = file_spec['filename']
for glob_match in glob.glob(pattern):
if os.path.isfile(glob_match):
- files.append(glob_match)
+ files.add(glob_match)
elif os.path.isdir(glob_match):
for root, dirs, filenames in os.walk(glob_match):
for f in filenames:
- files.append(os.path.join(root, f));
+ files.add(os.path.join(root, f));
os.chdir(cwd)
if not len(files):
@@ -38,8 +38,8 @@ def main(args):
return 1
with zipfile.ZipFile(output_file, mode = 'w',
- compression = zipfile.ZIP_DEFLATED) as output:
- for f in files:
+ compression = zipfile.ZIP_DEFLATED, allowZip64 = True) as output:
+ for f in sorted(files):
sys.stdout.write("%s\r" % f[:40].ljust(40, ' '))
sys.stdout.flush()
output.write(os.path.join(build_dir, f), f)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698