diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-05-09 16:54:09 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-05-09 16:54:09 +0000 |
commit | 67c90ed1e901dbdfce93b3b30596f7c5004b2996 (patch) | |
tree | f32a495c42793472c27daeffe2fec9e9be4ad5d6 /tools | |
parent | 5e32d414412edf6b56be8737ffffd01e7b9be4bf (diff) | |
parent | 13f0b68a8fad5ea7a3efe6e2f5e9df0216db5323 (diff) | |
download | build-67c90ed1e901dbdfce93b3b30596f7c5004b2996.tar.gz |
Merge "Reland "Fix retrofit OTA generation failures"" into main
Diffstat (limited to 'tools')
-rw-r--r-- | tools/releasetools/ota_utils.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/releasetools/ota_utils.py b/tools/releasetools/ota_utils.py index 048a497585..81b53dce36 100644 --- a/tools/releasetools/ota_utils.py +++ b/tools/releasetools/ota_utils.py @@ -1111,9 +1111,10 @@ def CopyTargetFilesDir(input_dir): relative_path = path.removeprefix(input_dir).removeprefix("/") if not Fnmatch(relative_path, UNZIP_PATTERN): continue - 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) + target_path = os.path.join( + output_dir, relative_path) + if os.path.exists(target_path): + continue + os.makedirs(os.path.dirname(target_path), exist_ok=True) + shutil.copy(path, target_path) return output_dir |