backup-client: allow to specify directories (prepare for catar backup)

This commit is contained in:
Dietmar Maurer
2018-12-27 10:11:11 +01:00
parent b62b6cadf4
commit bcd879cfb3
3 changed files with 64 additions and 30 deletions

View File

@ -62,9 +62,9 @@ impl DataStore {
})
}
pub fn create_image_writer<P: AsRef<Path>>(&mut self, filename: P, size: usize, chunk_size: usize) -> Result<ImageIndexWriter, Error> {
pub fn create_image_writer<P: AsRef<Path>>(&self, filename: P, size: usize, chunk_size: usize) -> Result<ImageIndexWriter, Error> {
let index = ImageIndexWriter::create(&mut self.chunk_store, filename.as_ref(), size, chunk_size)?;
let index = ImageIndexWriter::create(&self.chunk_store, filename.as_ref(), size, chunk_size)?;
Ok(index)
}