summaryrefslogtreecommitdiffstats
path: root/tools/aapt/Command.cpp
diff options
context:
space:
mode:
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 4742341..1a536d6 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);