Require story reference to read from archive

This commit is contained in:
Joakim Soderlund 2019-07-27 20:51:57 +00:00
parent 1d757327f1
commit 2e86fe6c25

View file

@ -74,9 +74,11 @@ where
} }
} }
pub fn read(&self, path: &str) -> Result<Vec<u8>> { pub fn read(&self, story: &Story) -> Result<Vec<u8>> {
use ZipError::*; use ZipError::*;
let path = &story.archive.path;
let mut archive = self.archive.lock().map_err(|e| match e { let mut archive = self.archive.lock().map_err(|e| match e {
_ => Error::archive("Could not acquire fetcher lock"), _ => Error::archive("Could not acquire fetcher lock"),
})?; })?;