summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-04-13 15:54:38 +0200
committerGitHub <noreply@github.com>2018-04-13 15:54:38 +0200
commit00b6f4ded3027f6014a782ad23df646bc0d33b03 (patch)
tree5c8eb2df9dbccfb39bfd94983c43ab9519d094f0 /lib
parenta53f13055744e0e7a69d33afb80d4ae566b7d667 (diff)
parent731b97cccb407a2fe4c1eca321176e7eec6ba143 (diff)
Merge pull request #1394 from matthiasbeyer/libimagentryref/fix-path-when-making-ref
Fix: Pass the right path variable here
Diffstat (limited to 'lib')
-rw-r--r--lib/entry/libimagentryref/src/refstore.rs4
1 files 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<RPG: UniqueRefPathGenerator, A: AsRef<Path>>(&'a self, path: A)
-> Result<FileLockEntry<'a>, 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)