From: Doug Zongker Date: Tue, 13 Oct 2009 20:47:54 +0000 (-0700) Subject: am afbf8afa: Merge change I564b5b00 into eclair-mr2 X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/b1387bdd1804412a7b3e2e81c41885153fc63634?hp=-c 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 --- b1387bdd1804412a7b3e2e81c41885153fc63634 diff --combined Command.cpp index 3019bd0,1a536d6..4067735 --- a/Command.cpp +++ b/Command.cpp @@@ -401,7 -401,7 +401,7 @@@ int doDump(Bundle* bundle ResXMLTree tree; asset = assets.openNonAsset(resname, Asset::ACCESS_BUFFER); if (asset == NULL) { - fprintf(stderr, "ERROR: dump failed because resource %p found\n", resname); + fprintf(stderr, "ERROR: dump failed because resource %s found\n", resname); goto bail; } @@@ -427,7 -427,7 +427,7 @@@ ResXMLTree tree; asset = assets.openNonAsset(resname, Asset::ACCESS_BUFFER); if (asset == NULL) { - fprintf(stderr, "ERROR: dump failed because resource %p found\n", resname); + fprintf(stderr, "ERROR: dump failed because resource %s found\n", resname); goto bail; } @@@ -848,7 -848,7 +848,7 @@@ printf("uses-feature:'android.hardware.camera'\n"); printf("uses-feature:'android.hardware.camera.autofocus'\n"); } - + if (hasMainActivity) { printf("main\n"); } @@@ -997,8 -997,15 +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);