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 --- subcmds/status.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'subcmds/status.py') diff --git a/subcmds/status.py b/subcmds/status.py index b47c8736..773f22d4 100644 --- a/subcmds/status.py +++ b/subcmds/status.py @@ -26,6 +26,7 @@ import itertools import os from color import Coloring +import platform_utils class Status(PagedCommand): common = True @@ -115,7 +116,7 @@ the following meanings: """find 'dirs' that are present in 'proj_dirs_parents' but not in 'proj_dirs'""" status_header = ' --\t' for item in dirs: - if not os.path.isdir(item): + if not platform_utils.isdir(item): outstring.append(''.join([status_header, item])) continue if item in proj_dirs: -- cgit v1.2.3-54-g00ecf