From e74fe51998426eb57354182111f1df5dcfa4dddc Mon Sep 17 00:00:00 2001 From: Simon Bourassa Blouin Date: Wed, 23 Mar 2022 15:12:37 -0400 Subject: [PATCH] Fix temp git clones clutter issue. Use filesystem.safe_delete_folder instead of shutil.rmtree since the later didn't delete read-only files. --- python/tank/descriptor/io_descriptor/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tank/descriptor/io_descriptor/git.py b/python/tank/descriptor/io_descriptor/git.py index 8b60f6d17..c8b867fd9 100644 --- a/python/tank/descriptor/io_descriptor/git.py +++ b/python/tank/descriptor/io_descriptor/git.py @@ -264,7 +264,7 @@ def _tmp_clone_then_execute_git_commands(self, commands, depth=None, ref=None): ) finally: log.debug("Cleaning up temp location '%s'" % clone_tmp) - shutil.rmtree(clone_tmp, ignore_errors=True) + filesystem.safe_delete_folder(clone_tmp) def get_system_name(self): """