diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java index af2fe79920..bb4904283c 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java @@ -97,7 +97,7 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat ActionFileSystem( FileSystem delegate, - Path execRoot, + PathFragment execRoot, String relativeOutputPath, ImmutableList<Root> sourceRoots, ActionInputMap inputArtifactData, @@ -107,7 +107,7 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat Profiler.instance().profile(ProfilerTask.ACTION_FS_STAGING, "staging")) { this.delegate = delegate; - this.execRootFragment = execRoot.asFragment(); + this.execRootFragment = execRoot; this.outputPathFragment = execRootFragment.getRelative(relativeOutputPath); this.sourceRoots = sourceRoots @@ -639,10 +639,15 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat return new ByteArrayOutputStream() { @Override public void close() throws IOException { + flush(); super.close(); + } + + @Override + public void flush() throws IOException { + super.flush(); byte[] data = toByteArray(); - set( - new InlineFileArtifactValue(data, Hashing.md5().hashBytes(data).asBytes()), + set(new InlineFileArtifactValue(data, Hashing.md5().hashBytes(data).asBytes()), /*notifyConsumer=*/ true); } }; |