libutil: return a source from readFile
don't consume a sink, return a source instead. the only reason to not do this is a very slight reduction in dynamic allocations, but since we are going to *at least* do disk io that will not be a lot of overhead anyway Change-Id: Iae2f879ec64c3c3ac1d5310eeb6a85e696d4614a
This commit is contained in:
@@ -385,7 +385,7 @@ StorePath BinaryCacheStore::addToStore(
|
||||
if (method == FileIngestionMethod::Recursive) {
|
||||
dumpPath(srcPath, sink, filter);
|
||||
} else {
|
||||
readFile(srcPath, sink);
|
||||
readFileSource(srcPath)->drainInto(sink);
|
||||
}
|
||||
auto h = sink.finish().first;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user