Chromium Code Reviews| Index: bootstrap/get_appengine.py |
| diff --git a/bootstrap/get_appengine.py b/bootstrap/get_appengine.py |
| index bee63ce67072cbc5bc1c28689e993fb3592c387e..0d9f1c90b9f625aa5e515e08667b4afb11e22cbe 100755 |
| --- a/bootstrap/get_appengine.py |
| +++ b/bootstrap/get_appengine.py |
| @@ -3,12 +3,14 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +import datetime |
| import logging |
| import optparse |
| import os |
| import re |
| import shutil |
| import sys |
| +import time |
| import tempfile |
| import urllib2 |
| import zipfile |
| @@ -48,13 +50,16 @@ def extract_zip(z, root_path): |
| count = 0 |
| for f in z.infolist(): |
| perm = (f.external_attr >> 16L) & 0777 |
| + mtime = time.mktime(datetime.datetime(*f.date_time).timetuple()) |
| filepath = os.path.join(root_path, f.filename) |
| logging.debug('Extracting %s', f.filename) |
| if f.filename.endswith('/'): |
| os.mkdir(filepath, perm) |
| + os.utime(filepath, (mtime, mtime)) |
|
Paweł Hajdan Jr.
2014/08/21 10:23:05
Since this is the same for both branches, why not
ukai
2014/08/21 14:12:18
Done.
|
| else: |
| z.extract(f, root_path) |
| os.chmod(filepath, perm) |
| + os.utime(filepath, (mtime, mtime)) |
| count += 1 |
| print('Extracted %d files' % count) |