Chromium Code Reviews| Index: build/android/gyp/package_resources.py |
| diff --git a/build/android/gyp/package_resources.py b/build/android/gyp/package_resources.py |
| index 9b6ec68b5025d85f6163109b2f088875808696c3..3eae8f475c98611b363bb5789e576ab79fcebb28 100755 |
| --- a/build/android/gyp/package_resources.py |
| +++ b/build/android/gyp/package_resources.py |
| @@ -102,9 +102,17 @@ def PackageArgsForExtractedZip(d): |
| """ |
| res_dirs = [] |
| subdirs = [os.path.join(d, s) for s in os.listdir(d)] |
| - subdirs = sorted([s for s in subdirs if os.path.isdir(s)]) |
| - if subdirs and os.path.basename(subdirs[0]) == '0': |
| - res_dirs = subdirs |
| + subdirs = [s for s in subdirs if os.path.isdir(s)] |
| + is_multi = True |
| + for s in subdirs: |
|
newt (away)
2015/03/13 23:13:45
How about just checking if 0 is present, like befo
cjhopman
2015/03/16 20:04:53
Done.
|
| + try: |
| + float(os.path.basename(s)) |
|
newt (away)
2015/03/13 23:13:45
why float and not int?
cjhopman
2015/03/16 20:04:53
Done.
|
| + except ValueError: |
| + is_multi = False |
| + break |
| + |
| + if is_multi: |
| + res_dirs = sorted(subdirs, key=lambda p : float(os.path.basename(p))) |
| else: |
| res_dirs = [d] |
| package_command = [] |