about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-17T22·09+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-17T22·09+0100
commitb6def5b542d35eaed5e8cbc6eaa9bbf644262686 (patch)
treeafbb52c01bced7a877acc4f6a9818963b21cd3ee /src
parentdfbcb7c403363c21c1eab8082ffaade29bba9036 (diff)
Make --repair work on Darwin
Mac OS X doesn't allow renaming a read-only directory.

http://hydra.nixos.org/build/9113895
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 62a03f751add..e8a70296fdb0 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2810,11 +2810,11 @@ void SubstitutionGoal::finished()
         return;
     }
 
-    canonicalisePathMetaData(destPath, -1);
+    if (repair) replaceValidPath(storePath, destPath);
 
-    worker.store.optimisePath(destPath); // FIXME: combine with hashPath()
+    canonicalisePathMetaData(storePath, -1);
 
-    if (repair) replaceValidPath(storePath, destPath);
+    worker.store.optimisePath(storePath); // FIXME: combine with hashPath()
 
     ValidPathInfo info2;
     info2.path = storePath;