From e6f2f5b17c85956db9c2318788b4e715767b7aca Mon Sep 17 00:00:00 2001 From: hlopko Date: Tue, 3 Sep 2019 03:03:33 -0700 Subject: [PATCH] Do not put blaze-grepped_includes_ files inside tree artifact directories RELNOTES: None. PiperOrigin-RevId: 266890605 --- .../build/lib/includescanning/SpawnIncludeScanner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java b/src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java index 06569c82ac7d77..fe6cfcc86ef2c1 100644 --- a/src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java +++ b/src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java @@ -283,8 +283,9 @@ public Collection extractInclusions( ActionExecutionContext actionExecutionContext, Artifact grepIncludes, GrepIncludesFileType fileType, - boolean placeNextToFile) + boolean isOutputFile) throws IOException, ExecException, InterruptedException { + boolean placeNextToFile = isOutputFile && !file.hasParent(); Path output = getIncludesOutput(file, actionExecutionContext.getPathResolver(), fileType, placeNextToFile); if (!inMemoryOutput) {