mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
[infra] copy_tree.py should not blow away existing files
Otherwise, files calculated by ninja to be clean are deleted, but not rebuilt. related #31774 Change-Id: I5f0c2a3f6b06de20195d8a3b7320dd59df38fbdb Reviewed-on: https://dart-review.googlesource.com/33700 Reviewed-by: Vijay Menon <vsm@google.com> Commit-Queue: Zach Anderson <zra@google.com>
This commit is contained in:
parent
ec3c098ee0
commit
2e87c35c04
1 changed files with 2 additions and 3 deletions
|
@ -65,7 +65,8 @@ def CopyTree(src, dst, ignore=None):
|
|||
else:
|
||||
ignored_names = set()
|
||||
|
||||
os.makedirs(dst)
|
||||
if not os.path.exists(dst):
|
||||
os.makedirs(dst)
|
||||
errors = []
|
||||
for name in names:
|
||||
if name in ignored_names:
|
||||
|
@ -143,8 +144,6 @@ def Main(argv):
|
|||
SourcesToGN(args.gn_paths)
|
||||
return 0
|
||||
|
||||
if os.path.exists(args.to):
|
||||
shutil.rmtree(args.to)
|
||||
if args.exclude_patterns == None:
|
||||
CopyTree(args.copy_from, args.to)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue