Merge "Fix retrofit OTA generation failures" into main

This commit is contained in:
Treehugger Robot
2024-05-08 17:35:43 +00:00
committed by Gerrit Code Review

View File

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