aboutsummaryrefslogtreecommitdiff
path: root/src/nix/add-to-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/add-to-store.cc')
-rw-r--r--src/nix/add-to-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/add-to-store.cc b/src/nix/add-to-store.cc
index 39e5cc99d..7dbbbcc56 100644
--- a/src/nix/add-to-store.cc
+++ b/src/nix/add-to-store.cc
@@ -37,7 +37,7 @@ struct CmdAddToStore : MixDryRun, StoreCommand
Hash hash = narHash;
if (ingestionMethod == FileIngestionMethod::Flat) {
HashSink hsink(htSHA256);
- readFile(path, hsink);
+ readFileSource(path)->drainInto(hsink);
hash = hsink.finish().first;
}