Chromium Code Reviews| Index: build/android/gyp/emma_instr.py |
| diff --git a/build/android/gyp/emma_instr.py b/build/android/gyp/emma_instr.py |
| index c6ef6183935dd40d2412088eee58eb94238b3d12..f63aef6f7a330358be768bcc7297eda7eadab876 100755 |
| --- a/build/android/gyp/emma_instr.py |
| +++ b/build/android/gyp/emma_instr.py |
| @@ -181,7 +181,11 @@ def _RunInstrumentCommand(_command, options, _, option_parser): |
| print('Error: multiple output files in: %s' % (temp_jar_dir)) |
| return 1 |
| - shutil.copy(os.path.join(temp_jar_dir, jars[0]), options.output_path) |
| + # Delete output_path first to avoid modifying input_path in the case where |
| + # input_path is a hardlink to output_path. http://crbug.com/571642 |
|
jbudorick
2015/12/22 19:34:44
I'm confused about how this fixes 571642. That fai
agrieve
2015/12/22 20:10:00
1. Build once without coverage enabled, and there'
jbudorick
2015/12/22 20:42:35
ah, ok. lgtm
|
| + if os.path.exists(options.output_path): |
| + os.unlink(options.output_path) |
| + shutil.move(os.path.join(temp_jar_dir, jars[0]), options.output_path) |
| finally: |
| shutil.rmtree(temp_dir) |