catar/encoder.rs: allow to pass list of devices

We can use this to implement the --one-file-system like options. This
is a bit more convenient, because this way we can select to include
multiple devices (which is required by container backups).
This commit is contained in:
Dietmar Maurer
2019-01-12 15:43:20 +01:00
parent a8a0495612
commit 4c0fd4871e
3 changed files with 37 additions and 4 deletions

View File

@ -133,7 +133,7 @@ fn create_archive(param: Value, _info: &ApiMethod) -> Result<Value, Error> {
let mut writer = std::io::BufWriter::with_capacity(1024*1024, file);
CaTarEncoder::encode(source, &mut dir, &mut writer)?;
CaTarEncoder::encode(source, &mut dir, None, &mut writer)?;
writer.flush()?;

View File

@ -40,7 +40,7 @@ fn backup_dir(
let path = std::path::PathBuf::from(path);
CaTarEncoder::encode(path, dir, &mut index)?;
CaTarEncoder::encode(path, dir, None, &mut index)?;
index.close()?; // commit changes