From 5547abc63b12c521113208eea0c5d7f66ba494d4 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Tue, 20 Feb 2024 20:34:17 +1100 Subject: [PATCH] Cater for different drive letters when normalizing path (#1169) Co-authored-by: James Sharpe --- foreign_cc/private/framework.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foreign_cc/private/framework.bzl b/foreign_cc/private/framework.bzl index 9c263c08..10268fb3 100644 --- a/foreign_cc/private/framework.bzl +++ b/foreign_cc/private/framework.bzl @@ -661,10 +661,10 @@ def _print_env(): ] def _normalize_path(path): - # Change Windows style paths to Unix style. E.g. change "C:" to "/c" + # Change Windows style paths to Unix style. if path[0].isalpha() and path[1] == ":": - path = path.replace(path[0:2], "/" + path[0].lower()) - + # Change "c:\foo;d:\bar" to "/c/foo:/d/bar + return "/" + path.replace("\\", "/").replace(":/", "/").replace(";", ":/") return path.replace("\\", "/").replace(";", ":") def _correct_path_variable(env):