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

Unified Diff: build/android/gyp/package_resources.py

Issue 1007043002: Fix android resources in gn builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stack_debug_better
Patch Set: Created 5 years, 9 months 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 | build/android/gyp/write_build_config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 = []
« no previous file with comments | « no previous file | build/android/gyp/write_build_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698