Use os.path.normcase in git-sync-deps

Avoid strange issues with path case insensitivity on Windows with
os.path.normcase.

Change-Id: I9327ba9c22cf5e3ff66b49af56bedd223b24efd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556025
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2022-07-06 13:52:07 -04:00 committed by SkCQ
parent ae7ec913ca
commit 32871e6901

View File

@ -94,7 +94,8 @@ def is_git_toplevel(git, directory):
try:
toplevel = subprocess.check_output(
[git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
return os.path.realpath(directory) == os.path.realpath(toplevel.decode())
return (os.path.normcase(os.path.realpath(directory)) ==
os.path.normcase(os.path.realpath(toplevel.decode())))
except subprocess.CalledProcessError:
return False