aboutsummaryrefslogtreecommitdiff
path: root/src/nix-hash
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-11-16 17:11:46 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-11-16 17:11:46 +0000
commita3883cbd28057a3dd2573f77dcda9a26faaac555 (patch)
tree3ad605543e6bba8869f9413fb4f77f73e936cd1a /src/nix-hash
parentfb9368b5a0b2457b28f19d4902bc0790123338a2 (diff)
* Store the size of a store path in the database (to be precise, the
size of the NAR serialisation of the path, i.e., `nix-store --dump PATH'). This is useful for Hydra.
Diffstat (limited to 'src/nix-hash')
-rw-r--r--src/nix-hash/nix-hash.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-hash/nix-hash.cc b/src/nix-hash/nix-hash.cc
index 8a6655403..4867234bf 100644
--- a/src/nix-hash/nix-hash.cc
+++ b/src/nix-hash/nix-hash.cc
@@ -44,7 +44,7 @@ void run(Strings args)
if (op == opHash) {
for (Strings::iterator i = ss.begin(); i != ss.end(); ++i) {
- Hash h = flat ? hashFile(ht, *i) : hashPath(ht, *i);
+ Hash h = flat ? hashFile(ht, *i) : hashPath(ht, *i).first;
if (truncate && h.hashSize > 20) h = compressHash(h, 20);
std::cout << format("%1%\n") %
(base32 ? printHash32(h) : printHash(h));