aboutsummaryrefslogtreecommitdiffstats
path: root/glob.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-09-21 15:30:13 -0700
committerColin Cross <ccross@android.com>2018-09-24 15:09:32 -0700
commite98d0828c87392c891c4098cea3c488c706c54e5 (patch)
treec1dd967359e1646de3e05d4cd2cc67782e6dd011 /glob.go
parent9e1ff7423bc96c4325179e3c69fe1e8884ef3fcb (diff)
downloadplatform_build_blueprint-e98d0828c87392c891c4098cea3c488c706c54e5.tar.gz
platform_build_blueprint-e98d0828c87392c891c4098cea3c488c706c54e5.tar.bz2
platform_build_blueprint-e98d0828c87392c891c4098cea3c488c706c54e5.zip
Add ShouldFollowSymlinks argument to pathtools.Glob
Allow the caller to specify whether symlinks should be followed (the old behavior) or not. Test: glob_test.go Test: fs_test.go Change-Id: I550dc91b8e6370fb32a9a1cbdcb2edade48bda46
Diffstat (limited to 'glob.go')
-rw-r--r--glob.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/glob.go b/glob.go
index 4553f69..4f7e978 100644
--- a/glob.go
+++ b/glob.go
@@ -19,6 +19,8 @@ import (
"fmt"
"sort"
"strings"
+
+ "github.com/google/blueprint/pathtools"
)
type GlobPath struct {
@@ -59,7 +61,7 @@ func (c *Context) glob(pattern string, excludes []string) ([]string, error) {
}
// Get a globbed file list
- files, deps, err := c.fs.Glob(pattern, excludes)
+ files, deps, err := c.fs.Glob(pattern, excludes, pathtools.FollowSymlinks)
if err != nil {
return nil, err
}