From b6def5b542d35eaed5e8cbc6eaa9bbf644262686 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 17 Feb 2014 23:09:48 +0100 Subject: [PATCH] Make --repair work on Darwin Mac OS X doesn't allow renaming a read-only directory. http://hydra.nixos.org/build/9113895 --- src/libstore/build.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 62a03f751..e8a70296f 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2810,12 +2810,12 @@ void SubstitutionGoal::finished() return; } - canonicalisePathMetaData(destPath, -1); - - worker.store.optimisePath(destPath); // FIXME: combine with hashPath() - if (repair) replaceValidPath(storePath, destPath); + canonicalisePathMetaData(storePath, -1); + + worker.store.optimisePath(storePath); // FIXME: combine with hashPath() + ValidPathInfo info2; info2.path = storePath; info2.hash = hash.first;