From bed8b62345e484b27e048e8f21280c5611f795df Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Thu, 27 Sep 2018 10:46:58 -0700 Subject: Add support for long paths * Add more file i/o wrappers in platform_utils to allow using long paths (length > MAX_PATH) on Windows. * Paths using the long path syntax ("\\?\" prefix) should never escape the platform_utils API surface area, so that this specific syntax is not visible to the rest of the repo code base. * Forward many calls from os.xxx to platform_utils.xxx in various place to ensure long paths support, specifically when repo decides to delete obsolete directories. * There are more places that need to be converted to support long paths, this commit is an initial effort to unblock a few common use cases. * Also, fix remove function to handle directory symlinks Change-Id: If82ccc408e516e96ff7260be25f8fd2fe3f9571a --- git_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git_config.py') diff --git a/git_config.py b/git_config.py index 70b22ce1..aac08855 100644 --- a/git_config.py +++ b/git_config.py @@ -503,7 +503,7 @@ def close_ssh(): d = ssh_sock(create=False) if d: try: - os.rmdir(os.path.dirname(d)) + platform_utils.rmdir(os.path.dirname(d)) except OSError: pass -- cgit v1.2.3-54-g00ecf