about summary refs log tree commit diff
path: root/src/nix-hash/nix-hash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-hash/nix-hash.cc')
-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 8a66554033b3..4867234bffc1 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));