a456c21348
FileWriter::Create() calls ftruncate(2) to truncate the destination file, which doesn't work with FD that references a block device. It leads to kIoError when calling ExtractEntryToFile() to extract an entry to block device FD. As a result, it fails the package_extract_file() command in OTA updates (e.g. 'package_extract_file("boot.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/boot")'). This CL skips the call to ftruncate(2) if FD references a block device. Bug: 32903624 Test: ziparchive-tests works. Test: Build an OTA updater (m updater) and call package_extract_file(). Change-Id: Ia81116f1a8d7cab802396bdc32c6096b4cb56a3c |
||
---|---|---|
.. | ||
testdata | ||
Android.bp | ||
entry_name_utils-inl.h | ||
entry_name_utils_test.cc | ||
zip_archive.cc | ||
zip_archive_common.h | ||
zip_archive_private.h | ||
zip_archive_stream_entry.cc | ||
zip_archive_test.cc | ||
zip_writer.cc | ||
zip_writer_test.cc |