diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-06-16T15·59+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-06-16T15·59+0000 |
commit | 2f04e7102eaad3159073019af96e6e5c4f2c9bcf (patch) | |
tree | 324814e02be135c03df6e456c1eec1227b3b85dc /src/values.cc | |
parent | a09e66da5af348dc25e3b372ec9f518d3532f863 (diff) |
* Path hashing.
Diffstat (limited to 'src/values.cc')
-rw-r--r-- | src/values.cc | 6 |
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; |