From 8b82c0d75071fa2152be3795d7c69233bab14458 Mon Sep 17 00:00:00 2001 From: Cosmin Tanislav Date: Wed, 20 Mar 2024 23:16:26 -0400 Subject: [PATCH] soong: paths: Fix out of tree $OUT Change-Id: Ia915a7fcb95c76272fff6d350dc69abacb7b9e00 --- android/paths.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/paths.go b/android/paths.go index a87445a5b..714e89990 100644 --- a/android/paths.go +++ b/android/paths.go @@ -2020,7 +2020,7 @@ func validatePathInternal(allowNinjaVariables bool, pathComponents ...string) (s } path := filepath.Clean(path) - if path == ".." || strings.HasPrefix(path, "../") || strings.HasPrefix(path, "/") { + if path == ".." || strings.HasPrefix(path, "../") || i != initialEmpty && strings.HasPrefix(path, "/") { return "", fmt.Errorf("Path is outside directory: %s", path) }