mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Have "wuffs gen" skip duplicate packages
This commit is contained in:
1 parent
7b98b785f2
commit
a255958b41
1 file changed
+8
@@ -69,9 +69,17 @@ type genHelper struct {
|
||||
wuffsRoot string
|
||||
langs []string
|
||||
affected []string
|
||||
seen map[string]struct{}
|
||||
}
|
||||
|
||||
func (h *genHelper) gen(dirname string, recursive bool) error {
|
||||
if h.seen == nil {
|
||||
h.seen = map[string]struct{}{}
|
||||
} else if _, ok := h.seen[dirname]; ok {
|
||||
return nil
|
||||
}
|
||||
h.seen[dirname] = struct{}{}
|
||||
|
||||
filenames, dirnames, err := listDir(h.wuffsRoot, dirname, recursive)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user