builder: build: filesystem.py: ignore errors for existing directories

This commit is contained in:
Jos Dehaes 2024-08-21 17:57:12 +03:00 committed by anonymix007
parent 4b6d3c4094
commit d271a19b07

View File

@ -139,7 +139,7 @@ def add_file(ctx: ArchBuilderContext, file: dict):
src = os.path.join(ctx.dir, src)
log.debug(f"copy {src} to {real}")
if folder:
shutil.copytree(src, real, symlinks=follow)
shutil.copytree(src, real, symlinks=follow, dirs_exist_ok=True)
else:
shutil.copyfile(src, real, follow_symlinks=follow)
else: