From e98d0828c87392c891c4098cea3c488c706c54e5 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 21 Sep 2018 15:30:13 -0700 Subject: 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 --- glob.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'glob.go') 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 } -- cgit v1.2.3