commit | 479f5b04afa5f75d2dc77ebf9f1649d59134ee5b | [log] [tgz] |
---|---|---|
author | maxwen <max.weninger@gmail.com> | Wed Mar 20 14:41:25 2024 +0100 |
committer | micky387 <mickaelsaibi@free.fr> | Tue Sep 10 20:51:30 2024 -0400 |
tree | cc20b6700c8ffef22b78fe156d4481f51741e167 | |
parent | 3fe78dc9b32f1ac3f7eb279ae9376d7037b18452 [diff] [blame] |
soong: fix absolute path check in validatePath breaks support for absolute out dir Add: thx to https://github.com/LineageOS/android_build_soong/commit/883519c94711de4e8b4e3368231451604a500d0b For the solution to check for i != initialEmpty Change-Id: Ibb17eb0601a079f0f6c3f452aa7cbc34cd191e6d
diff --git a/android/paths.go b/android/paths.go index edc0700..6f8f7f2 100644 --- a/android/paths.go +++ b/android/paths.go
@@ -1970,7 +1970,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) }