Chromium Code Reviews| Index: client/cipd.py |
| diff --git a/client/cipd.py b/client/cipd.py |
| index 6d8eb3e3d5f32643e07cda7b5100c6e5a220da00..1362b7aa2d9a0c7c7de19d22e85dea548d2f3fe6 100644 |
| --- a/client/cipd.py |
| +++ b/client/cipd.py |
| @@ -395,6 +395,10 @@ def get_client( |
| # binary. |
| binary_path = unicode(os.path.join(cache_dir, 'cipd' + EXECUTABLE_SUFFIX)) |
| if fs.isfile(binary_path): |
| + # Ensure file is writable to delete the hardlink. This is important on |
| + # Windows. Note that mode is stored on file node, not the hardlink, so |
| + # keep it executable. |
| + fs.chmod(0711, binary_path) |
|
M-A Ruel
2016/06/14 18:17:46
file_path.try_remove() does it automatically.
nodir
2016/06/14 22:16:05
Done.
|
| fs.unlink(binary_path) |
| instance_cache.hardlink(instance_id, binary_path, 0511) # -r-x--x--x |