summaryrefslogtreecommitdiffstats
path: root/libimagstore
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-05-29 01:31:17 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-05-29 01:31:17 +0200
commit9d37ffef919ba596d692d8e8a28d516de3ad107a (patch)
tree2da7a33d8a2f39c8249616a782bc1861c3008361 /libimagstore
parent8c00723db4c11f2d4f587add5c6c67943cf5e2f4 (diff)
parent64e28f3c319e53a46c034c57ef2f2216a5c2a9d8 (diff)
Merge pull request #454 from matthiasbeyer/libimagstore/hook-exec-error-fix
Libimagstore/hook exec error fix
Diffstat (limited to 'libimagstore')
-rw-r--r--libimagstore/src/hook/accessor.rs9
-rw-r--r--libimagstore/src/store.rs2
2 files changed, 7 insertions, 4 deletions
diff --git a/libimagstore/src/hook/accessor.rs b/libimagstore/src/hook/accessor.rs
index 88c8153b..e9d39915 100644
--- a/libimagstore/src/hook/accessor.rs
+++ b/libimagstore/src/hook/accessor.rs
@@ -1,19 +1,22 @@
+use std::fmt::Debug;
+
use hook::result::HookResult;
use store::FileLockEntry;
use storeid::StoreId;
-pub trait StoreIdAccessor : Send + Sync {
+pub trait StoreIdAccessor : Debug + Send + Sync {
fn access(&self, &StoreId) -> HookResult<()>;
}
-pub trait MutableHookDataAccessor : Send + Sync {
+pub trait MutableHookDataAccessor : Debug + Send + Sync {
fn access_mut(&self, &mut FileLockEntry) -> HookResult<()>;
}
-pub trait NonMutableHookDataAccessor : Send + Sync {
+pub trait NonMutableHookDataAccessor : Debug + Send + Sync {
fn access(&self, &FileLockEntry) -> HookResult<()>;
}
+#[derive(Debug)]
pub enum HookDataAccessor<'a> {
StoreIdAccess(&'a StoreIdAccessor),
MutableAccess(&'a MutableHookDataAccessor),
diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs
index b3408a16..8af9519e 100644
--- a/libimagstore/src/store.rs
+++ b/libimagstore/src/store.rs
@@ -372,7 +372,7 @@ impl Store {
})
.map(|e| FileLockEntry::new(self, e, id))
.and_then(|mut fle| {
- self.execute_hooks_for_mut_file(self.pre_retrieve_aspects.clone(), &mut fle)
+ self.execute_hooks_for_mut_file(self.post_retrieve_aspects.clone(), &mut fle)
.map_err(|e| SE::new(SEK::HookExecutionError, Some(Box::new(e))))
.and(Ok(fle))
})