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

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..2251de00c89178e176478469dee313527e145ff1 100755
--- a/build/android/gyp/package_resources.py
+++ b/build/android/gyp/package_resources.py
@@ -100,11 +100,11 @@ def PackageArgsForExtractedZip(d):
multiple targets. If it is multiple targets merged into one, the actual
resource directories will be contained in the subdirectories 0, 1, 2, ...
"""
- 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 = '0' in [os.path.basename(s) for s in subdirs]
+ if is_multi:
+ res_dirs = sorted(subdirs, key=lambda p : int(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