From fe73a53d446186676982af339454c1a80d4f0747 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 7 Aug 2016 16:54:36 +0200 Subject: [PATCH] Add StoreId::new() --- libimagstore/src/storeid.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libimagstore/src/storeid.rs b/libimagstore/src/storeid.rs index 52388d84..3c1b3dca 100644 --- a/libimagstore/src/storeid.rs +++ b/libimagstore/src/storeid.rs @@ -21,6 +21,10 @@ pub struct StoreId { impl StoreId { + pub fn new(base: Option, id: PathBuf) -> StoreId { + StoreId { base: base, id: id } + } + pub fn storified(self, store: &Store) -> StoreId { if self.starts_with(store.path()) { debug!("Not storifying {:?}, because it is already.", self);