diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-09-05 14:19:37 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-09-05 16:15:40 +0200 |
commit | a6ca041903aef5b3c91dab00797a2f25a28eab68 (patch) | |
tree | 9c0edbf5cdd09f76ac5a6cf7d95746337f48dc47 /libimagref | |
parent | 8a3d4fc0b204607c73785a0b5a6d036054125ddd (diff) |
Fix Ref::get_stored_hash() for reading the right header field
Diffstat (limited to 'libimagref')
-rw-r--r-- | libimagref/src/reference.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libimagref/src/reference.rs b/libimagref/src/reference.rs index 3fed6680..571312bf 100644 --- a/libimagref/src/reference.rs +++ b/libimagref/src/reference.rs @@ -239,7 +239,8 @@ impl<'a> Ref<'a> { /// Get the hash of the link target which is stored in the ref object pub fn get_stored_hash(&self) -> Result<String> { - match self.0.get_header().read("ref.content_hash") { + let hasher_name = DefaultHasher::new().hash_name(); + match self.0.get_header().read(&format!("ref.content_hash.{}", hasher_name)[..]) { // content hash stored... Ok(Some(Value::String(s))) => Ok(s), |