Merge "dist: copy dir allow dir to already exist & don't copy permissions" am: 6291358b17

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

Change-Id: Iff87f2881d0274a6a963c3081451ba3b38c35310
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/dist/dist.py b/dist/dist.py
index c6d3f13..39d3c12 100644
--- a/dist/dist.py
+++ b/dist/dist.py
@@ -72,7 +72,7 @@
             shutil.copyfile(src_abspath, dst, follow_symlinks=True)
         elif os.path.isdir(src):
             print("[dist] Copying dir: %s" % dst)
-            shutil.copytree(src_abspath, dst)
+            shutil.copytree(src_abspath, dst, copy_function=shutil.copyfile, dirs_exist_ok=True)
 
     for archive in archives:
         try: