From 4e17e7a4da4d82c3664b0b691c6a50debcb9e896 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 May 2016 12:05:46 +0200 Subject: Fix segfault in nix-copy-closure --- perl/lib/Nix/Store.xs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl/lib/Nix/Store.xs') diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index f0e990071..ee60ce130 100644 --- a/perl/lib/Nix/Store.xs +++ b/perl/lib/Nix/Store.xs @@ -25,6 +25,7 @@ static ref store() static std::shared_ptr _store; if (!_store) { try { + logger = makeDefaultLogger(); settings.processEnvironment(); settings.loadConfFile(); settings.update(); @@ -173,7 +174,7 @@ void exportPaths(int fd, ...) PPCODE: try { Paths paths; - for (int n = 2; n < items; ++n) paths.push_back(SvPV_nolen(ST(n))); + for (int n = 1; n < items; ++n) paths.push_back(SvPV_nolen(ST(n))); FdSink sink(fd); store()->exportPaths(paths, sink); } catch (Error & e) { -- cgit v1.2.3