From 30c8c3ba2d5be3a02db00e89bd54cd050764a209 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 3 Jun 2016 13:37:52 +0200
Subject: [PATCH] Fix some more references to storeDir

---
 src/libstore/local-store.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 33df25c15..f70742f22 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -547,7 +547,7 @@ uint64_t LocalStore::addValidPath(State & state,
        efficiently query whether a path is an output of some
        derivation. */
     if (isDerivation(info.path)) {
-        Derivation drv = readDerivation(info.path);
+        Derivation drv = readDerivation(realStoreDir + "/" + baseNameOf(info.path));
 
         /* Verify that the output paths in the derivation are correct
            (i.e., follow the scheme for computing output paths from
@@ -869,7 +869,7 @@ void LocalStore::registerValidPaths(const ValidPathInfos & infos)
             if (isDerivation(i.path)) {
                 // FIXME: inefficient; we already loaded the
                 // derivation in addValidPath().
-                Derivation drv = readDerivation(i.path);
+                Derivation drv = readDerivation(realStoreDir + "/" + baseNameOf(i.path));
                 checkDerivationOutputs(i.path, drv);
             }