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:
@ -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()?;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user