about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-03-23T12·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-03-23T12·06+0000
commita04c62e0c4f0f8d3bd9cda21173a0193be9eda8a (patch)
tree9c7be8c0173dc5a5d3861b6f6629e6be51368875 /src
parentf20f08156031f04a60025bc7a41dd3fcc117baa7 (diff)
* Canonicalise path meta-data in `nix-store --register-validity'.
Diffstat (limited to 'src')
-rw-r--r--src/nix-store/main.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc
index f7b2233e42ae..956cbb4fbbe4 100644
--- a/src/nix-store/main.cc
+++ b/src/nix-store/main.cc
@@ -423,8 +423,11 @@ static void opRegisterValidity(Strings opFlags, Strings opArgs)
             references.insert(s);
         }
         if (!cin || cin.eof()) throw Error("missing input");
-        if (!isValidPathTxn(txn, path))
+        if (!isValidPathTxn(txn, path)) {
+            /* !!! races */
+            canonicalisePathMetaData(path);
             registerValidPath(txn, path, hashPath(htSHA256, path), references, deriver);
+        }
     }
 
     txn.commit();