summaryrefslogtreecommitdiff
path: root/tools/aapt/Command.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2009-10-13 13:47:54 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-10-13 13:47:54 -0700
commitb80d1d0cc8b75b9e51c94169892f1d03cdcd788a (patch)
tree51a4c2ae6626cbe3630dd24bc5fdec5ed9f6654a /tools/aapt/Command.cpp
parent947c45b29586b64c358b7824881d98faa8733ba8 (diff)
parentafbf8afa858a78b66c19f11cfda030e913b34085 (diff)
am afbf8afa: Merge change I564b5b00 into eclair-mr2
Merge commit 'afbf8afa858a78b66c19f11cfda030e913b34085' into eclair-mr2-plus-aosp * commit 'afbf8afa858a78b66c19f11cfda030e913b34085': add "junk path" -k option to aapt
Diffstat (limited to 'tools/aapt/Command.cpp')
-rw-r--r--tools/aapt/Command.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 3019bd0f5e9e..4067735dd165 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -848,7 +848,7 @@ int doDump(Bundle* bundle)
printf("uses-feature:'android.hardware.camera'\n");
printf("uses-feature:'android.hardware.camera.autofocus'\n");
}
-
+
if (hasMainActivity) {
printf("main\n");
}
@@ -997,8 +997,15 @@ int doAdd(Bundle* bundle)
printf(" '%s'... (from gzip)\n", fileName);
result = zip->addGzip(fileName, String8(fileName).getBasePath().string(), NULL);
} else {
- printf(" '%s'...\n", fileName);
- result = zip->add(fileName, bundle->getCompressionMethod(), NULL);
+ if (bundle->getJunkPath()) {
+ String8 storageName = String8(fileName).getPathLeaf();
+ printf(" '%s' as '%s'...\n", fileName, storageName.string());
+ result = zip->add(fileName, storageName.string(),
+ bundle->getCompressionMethod(), NULL);
+ } else {
+ printf(" '%s'...\n", fileName);
+ result = zip->add(fileName, bundle->getCompressionMethod(), NULL);
+ }
}
if (result != NO_ERROR) {
fprintf(stderr, "Unable to add '%s' to '%s'", bundle->getFileSpecEntry(i), zipFileName);