Chromium Code Reviews| Index: git_cache.py |
| diff --git a/git_cache.py b/git_cache.py |
| index bfdef80d797431d12a3c922a0236ff6931e4875c..21252535f491146eea20efa32179144b8d469827 100755 |
| --- a/git_cache.py |
| +++ b/git_cache.py |
| @@ -416,6 +416,8 @@ class Mirror(object): |
| finally: |
| if tempdir: |
| try: |
| + if os.path.exists(self.mirror_path): |
| + gclient_utils.rmtree(self.mirror_path) |
| os.rename(tempdir, self.mirror_path) |
| except OSError as e: |
| # This is somehow racy on Windows. |