about summary refs log tree commit diff
path: root/src/values.cc
diff options
context:
space:
mode:
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;