Skip to content

Commit

Permalink
Fix segfault in nix-copy-closure
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed May 4, 2016
1 parent 33de2bc commit 4e17e7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion perl/lib/Nix/Store.xs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ static ref<Store> store()
static std::shared_ptr<Store> _store;
if (!_store) {
try {
logger = makeDefaultLogger();
settings.processEnvironment();
settings.loadConfFile();
settings.update();
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4e17e7a

Please sign in to comment.