about summary refs log tree commit diff
path: root/src/libutil/compression.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-03-15T13·40+0100
committerEelco Dolstra <edolstra@gmail.com>2017-03-15T15·50+0100
commit25dff2b7dbab54bd97b5ec22a05e594504555a12 (patch)
tree5847593a4cd246899ef09a47fd44b0c872c5fe6e /src/libutil/compression.cc
parent042975ea8e2e081c0d44190c8b41104131f8c6d4 (diff)
runProgram(): Distinguish between empty input and no input
For example, if we call brotli with an empty input, it shouldn't read
from the caller's stdin.
Diffstat (limited to 'src/libutil/compression.cc')
-rw-r--r--src/libutil/compression.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc
index 5df97e739236..8ffd55efb23c 100644
--- a/src/libutil/compression.cc
+++ b/src/libutil/compression.cc
@@ -92,7 +92,7 @@ static ref<std::string> decompressBzip2(const std::string & in)
 static ref<std::string> decompressBrotli(const std::string & in)
 {
     // FIXME: use libbrotli
-    return make_ref<std::string>(runProgram(BRO, true, {"-d"}, in));
+    return make_ref<std::string>(runProgram(BRO, true, {"-d"}, {in}));
 }
 
 ref<std::string> compress(const std::string & method, const std::string & in)