Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5334edd2 authored by Colin Cross's avatar Colin Cross
Browse files

Check RuleBuilder temporaries for path errors

Output files in sandboxed RuleBuilder rules must be under the output
directory, but output paths that were marked as temporaries were
not error checked.

Bug: 182612695
Test: rule_builder_test.go
Change-Id: I09616402ef1637c2c455ec7d345a296711582e8f
parent 1c217fdc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -523,6 +523,12 @@ func (r *RuleBuilder) Build(name string, desc string) {
			})
		}

		// Outputs that were marked Temporary will not be checked that they are in the output
		// directory by the loop above, check them here.
		for path := range r.temporariesSet {
			Rel(r.ctx, r.outDir.String(), path.String())
		}

		// Add a hash of the list of input files to the manifest so that the textproto file
		// changes when the list of input files changes and causes the sbox rule that
		// depends on it to rerun.