soong: paths: Fix out of tree $OUT
Change-Id: Ia915a7fcb95c76272fff6d350dc69abacb7b9e00
diff --git a/android/paths.go b/android/paths.go
index a87445a..714e899 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -2020,7 +2020,7 @@
}
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)
}