diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2299,10 +2299,10 @@ class Project(object): | |||
2299 | print("Retrying clone after deleting %s" % | 2299 | print("Retrying clone after deleting %s" % |
2300 | self.gitdir, file=sys.stderr) | 2300 | self.gitdir, file=sys.stderr) |
2301 | try: | 2301 | try: |
2302 | shutil.rmtree(os.path.realpath(self.gitdir)) | 2302 | platform_utils.rmtree(os.path.realpath(self.gitdir)) |
2303 | if self.worktree and os.path.exists(os.path.realpath | 2303 | if self.worktree and os.path.exists(os.path.realpath |
2304 | (self.worktree)): | 2304 | (self.worktree)): |
2305 | shutil.rmtree(os.path.realpath(self.worktree)) | 2305 | platform_utils.rmtree(os.path.realpath(self.worktree)) |
2306 | return self._InitGitDir(mirror_git=mirror_git, force_sync=False) | 2306 | return self._InitGitDir(mirror_git=mirror_git, force_sync=False) |
2307 | except: | 2307 | except: |
2308 | raise e | 2308 | raise e |
@@ -2344,9 +2344,9 @@ class Project(object): | |||
2344 | self.config.SetString('core.bare', None) | 2344 | self.config.SetString('core.bare', None) |
2345 | except Exception: | 2345 | except Exception: |
2346 | if init_obj_dir and os.path.exists(self.objdir): | 2346 | if init_obj_dir and os.path.exists(self.objdir): |
2347 | shutil.rmtree(self.objdir) | 2347 | platform_utils.rmtree(self.objdir) |
2348 | if init_git_dir and os.path.exists(self.gitdir): | 2348 | if init_git_dir and os.path.exists(self.gitdir): |
2349 | shutil.rmtree(self.gitdir) | 2349 | platform_utils.rmtree(self.gitdir) |
2350 | raise | 2350 | raise |
2351 | 2351 | ||
2352 | def _UpdateHooks(self): | 2352 | def _UpdateHooks(self): |
@@ -2516,7 +2516,7 @@ class Project(object): | |||
2516 | except GitError as e: | 2516 | except GitError as e: |
2517 | if force_sync: | 2517 | if force_sync: |
2518 | try: | 2518 | try: |
2519 | shutil.rmtree(dotgit) | 2519 | platform_utils.rmtree(dotgit) |
2520 | return self._InitWorkTree(force_sync=False, submodules=submodules) | 2520 | return self._InitWorkTree(force_sync=False, submodules=submodules) |
2521 | except: | 2521 | except: |
2522 | raise e | 2522 | raise e |
@@ -2536,7 +2536,7 @@ class Project(object): | |||
2536 | self._CopyAndLinkFiles() | 2536 | self._CopyAndLinkFiles() |
2537 | except Exception: | 2537 | except Exception: |
2538 | if init_dotgit: | 2538 | if init_dotgit: |
2539 | shutil.rmtree(dotgit) | 2539 | platform_utils.rmtree(dotgit) |
2540 | raise | 2540 | raise |
2541 | 2541 | ||
2542 | def _gitdir_path(self, path): | 2542 | def _gitdir_path(self, path): |