From 41d7d1c213dc98a7962fe92bba1539706040309b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 2 Jul 2016 23:26:43 +0200 Subject: [PATCH] Store::create() Make outgoing storeid object unstorified --- libimagstore/src/store.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 1d7a3931..b992ee6c 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -344,10 +344,13 @@ impl Store { se }); - let mut fle = FileLockEntry::new(self, Entry::new(id)); - self.execute_hooks_for_mut_file(self.post_create_aspects.clone(), &mut fle) - .map_err_into(SEK::PostHookExecuteError) - .map(|_| fle) + id.unstorified(self) + .and_then(|id| { + let mut fle = FileLockEntry::new(self, Entry::new(id)); + self.execute_hooks_for_mut_file(self.post_create_aspects.clone(), &mut fle) + .map_err_into(SEK::PostHookExecuteError) + .map(|_| fle) + }) .map_err_into(SEK::CreateCallError) }