From b97416e09e4c413992a955082dee7ade3a3d69ae Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Mon, 15 May 2023 11:13:26 -0700 Subject: [PATCH] Allow source build to be an extracted target_files common.LoadInfoDict() already supports loading from extracted directories, just use it. Test: generate an incremental OTA where both inputs are directories Bug: 227848550 Bug: 277028723 Change-Id: Iedba831bb4d65d971df6b2ac95279e3234a02e2f --- tools/releasetools/ota_from_target_files.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 04ef5ef3a8..afbe81a328 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -525,8 +525,7 @@ def GetTargetFilesZipWithoutPostinstallConfig(input_file): def ParseInfoDict(target_file_path): - with zipfile.ZipFile(target_file_path, 'r', allowZip64=True) as zfp: - return common.LoadInfoDict(zfp) + return common.LoadInfoDict(target_file_path) def GetTargetFilesZipForCustomVABCCompression(input_file, vabc_compression_param):