def _patch_path(path):
	r"""
	Paths have a max length of api.MAX_PATH characters (260). If a target path
	is longer than that, it needs to be made absolute and prepended with
	\\?\ in order to work with API calls.
	See http://msdn.microsoft.com/en-us/library/aa365247%28v=vs.85%29.aspx for
	details.
	"""
	if path.startswith('\\\\?\\'):
		return path
	abs_path = os.path.abspath(path)
	if not abs_path[1] == ':':
		# python doesn't include the drive letter, but \\?\ requires it
		abs_path = os.getcwd()[:2] + abs_path
	return '\\\\?\\' + abs_path