Merge "Revert "Fix retrofit OTA generation failures"" into main am: e41c75cb83 am: 094641230e

Original change: https://android-review.googlesource.com/c/platform/build/+/3079786

Change-Id: I68fe99bf478f81f4d085e330c8e74fdc95380324
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Kelvin Zhang
2024-05-08 21:15:19 +00:00
committed by Automerger Merge Worker

View File

@@ -1111,8 +1111,9 @@ def CopyTargetFilesDir(input_dir):
relative_path = path.removeprefix(input_dir).removeprefix("/")
if not Fnmatch(relative_path, UNZIP_PATTERN):
continue
target_path = os.path.join(
output_dir, relative_path)
os.makedirs(os.path.dirname(target_path), exist_ok=True)
shutil.copy(path, target_path)
if filename.endswith(".prop") or filename == "prop.default" or "/etc/vintf/" in relative_path:
target_path = os.path.join(
output_dir, relative_path)
os.makedirs(os.path.dirname(target_path), exist_ok=True)
shutil.copy(path, target_path)
return output_dir