aboutsummaryrefslogtreecommitdiff
path: root/src/nix-copy-closure
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-copy-closure')
-rwxr-xr-xsrc/nix-copy-closure/nix-copy-closure.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nix-copy-closure/nix-copy-closure.cc b/src/nix-copy-closure/nix-copy-closure.cc
index 4340443b5..ed43bffbc 100755
--- a/src/nix-copy-closure/nix-copy-closure.cc
+++ b/src/nix-copy-closure/nix-copy-closure.cc
@@ -47,13 +47,17 @@ int main(int argc, char ** argv)
if (sshHost.empty())
throw UsageError("no host name specified");
- auto remoteUri = "legacy-ssh://" + sshHost + (gzip ? "?compress=true" : "");
+ auto remoteUri = "ssh://" + sshHost + (gzip ? "?compress=true" : "");
auto to = toMode ? openStore(remoteUri) : openStore();
auto from = toMode ? openStore() : openStore(remoteUri);
+ PathSet storePaths2;
+ for (auto & path : storePaths)
+ storePaths2.insert(from->followLinksToStorePath(path));
+
PathSet closure;
- from->computeFSClosure(storePaths, closure, false, includeOutputs);
+ from->computeFSClosure(storePaths2, closure, false, includeOutputs);
- copyPaths(from, to, Paths(closure.begin(), closure.end()), useSubstitutes);
+ copyPaths(from, to, closure, useSubstitutes);
});
}