about summary refs log tree commit diff
path: root/src/values.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-06-16T15·59+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-06-16T15·59+0000
commit2f04e7102eaad3159073019af96e6e5c4f2c9bcf (patch)
tree324814e02be135c03df6e456c1eec1227b3b85dc /src/values.cc
parenta09e66da5af348dc25e3b372ec9f518d3532f863 (diff)
* Path hashing.
Diffstat (limited to 'src/values.cc')
-rw-r--r--src/values.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/values.cc b/src/values.cc
index 064203ae2836..77a6f928e1a2 100644
--- a/src/values.cc
+++ b/src/values.cc
@@ -19,7 +19,7 @@ static string absValuePath(string s)
 
 Hash addValue(string path)
 {
-    Hash hash = hashFile(path);
+    Hash hash = hashPath(path);
 
     string name;
     if (queryDB(nixDB, dbRefs, hash, name)) {
@@ -72,8 +72,8 @@ string queryValuePath(Hash hash)
         if (queryDB(nixDB, dbRefs, hash, name)) {
             string fn = absValuePath(name);
 
-            /* Verify that the file hasn't changed. !!! race */
-            if (hashFile(fn) != hash)
+            /* Verify that the file hasn't changed. !!! race !!! slow */
+            if (hashPath(fn) != hash)
                 throw Error("file " + fn + " is stale");
 
             return fn;