From 731b97cccb407a2fe4c1eca321176e7eec6ba143 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 13 Apr 2018 14:03:35 +0200 Subject: [PATCH] Fix: Pass the right path variable here The ref library passed the wrong variable as path which caused the setting in the entries to be wrong. This patch fixes this. --- lib/entry/libimagentryref/src/refstore.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/entry/libimagentryref/src/refstore.rs b/lib/entry/libimagentryref/src/refstore.rs index f8ca94d0..6f57553b 100644 --- a/lib/entry/libimagentryref/src/refstore.rs +++ b/lib/entry/libimagentryref/src/refstore.rs @@ -103,7 +103,7 @@ impl<'a> RefStore<'a> for Store { fn create_ref>(&'a self, path: A) -> Result, RPG::Error> { - let hash = RPG::unique_hash(path)?; + let hash = RPG::unique_hash(&path)?; let pathbuf = PathBuf::from(format!("{}/{}", RPG::collection(), hash)); let sid = StoreId::new_baseless(pathbuf.clone()).map_err(RE::from)?; @@ -111,7 +111,7 @@ impl<'a> RefStore<'a> for Store { self.create(sid) .map_err(RE::from) .and_then(|mut fle| { - fle.make_ref(hash, pathbuf)?; + fle.make_ref(hash, path)?; Ok(fle) }) .map_err(RPG::Error::from)