From: Doug Zongker Date: Tue, 20 Oct 2009 20:36:06 +0000 (-0700) Subject: am 617262d8: Merge change I37c4157d into eclair X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/9469dae5aea99b5a8fff413d5e5cc8f0944df0f0?ds=inline;hp=-c am 617262d8: Merge change I37c4157d into eclair Merge commit '617262d8f57362536ddc00a070c1c0994741de44' into eclair-plus-aosp * commit '617262d8f57362536ddc00a070c1c0994741de44': add "junk path" -k option to aapt (DO NOT MERGE) --- 9469dae5aea99b5a8fff413d5e5cc8f0944df0f0 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);