[git-cache] Fix path splitting.

Bug:1372658
Change-Id: I83627ecc8cee754a1830a9c4453c59bd9c01d728
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3946647
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
diff --git a/git_cache.py b/git_cache.py
index 6d827a5..5b59288 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -518,7 +518,7 @@
     # before we upload to GS.
     # See crbug.com/1370443; keep this check until root cause is found.
     recursed_dir = os.path.join(self.mirror_path,
-                                self.mirror_path.split(os.path)[-1])
+                                self.mirror_path.split(os.path.sep)[-1])
     if os.path.exists(recursed_dir):
       self.print('Deleting unexpected directory: %s' % recursed_dir)
       os.remove(recursed_dir)