Support nested glob patterns
Globbing separately for path/to/lib and path/to/lib/test would result in
trying to use intermediates/path/to/lib as both a file list file for the
first glob and as a directory to store the file list file for the second
glob, causing ninja to exit with an mkdir "Not a directory" error.
Add ".glob" to the file list file name to avoid collisions.
Change-Id: I8b9de9133d7ef667088a2f13eb28652508f3a290
diff --git a/common/glob.go b/common/glob.go
index 96655cf..5b03bc1 100644
--- a/common/glob.go
+++ b/common/glob.go
@@ -73,7 +73,7 @@
}
func Glob(ctx globContext, outDir string, globPattern string, excludes []string) ([]string, error) {
- fileListFile := filepath.Join(outDir, "glob", globToString(globPattern))
+ fileListFile := filepath.Join(outDir, "glob", globToString(globPattern)+".glob")
depFile := fileListFile + ".d"
// Get a globbed file list, and write out fileListFile and depFile