about summary refs log tree commit diff
path: root/src/libstore/legacy-ssh-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-03-21T22·12+0100
committerEelco Dolstra <edolstra@gmail.com>2018-03-21T22·13+0100
commit11898d6a37c80d4e78fc2df44617335669dfa95e (patch)
tree19fbc7adf04592701d3e918853f98e1d8e537cfc /src/libstore/legacy-ssh-store.cc
parent47f7e5585bbb9a6acfaddda7327ba4eeb5b662c2 (diff)
Make 'nix copy --to ssh://...' run in constant memory
Diffstat (limited to 'src/libstore/legacy-ssh-store.cc')
-rw-r--r--src/libstore/legacy-ssh-store.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc
index b52de5434155..5dee25308f7f 100644
--- a/src/libstore/legacy-ssh-store.cc
+++ b/src/libstore/legacy-ssh-store.cc
@@ -120,7 +120,7 @@ struct LegacySSHStore : public Store
         });
     }
 
-    void addToStore(const ValidPathInfo & info, const ref<std::string> & nar,
+    void addToStore(const ValidPathInfo & info, Source & source,
         RepairFlag repair, CheckSigsFlag checkSigs,
         std::shared_ptr<FSAccessor> accessor) override
     {
@@ -131,7 +131,7 @@ struct LegacySSHStore : public Store
         conn->to
             << cmdImportPaths
             << 1;
-        conn->to(*nar);
+        copyNAR(source, conn->to);
         conn->to
             << exportMagic
             << info.path