mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
clean snapshot creation
This commit is contained in:
parent
a85e7abb0c
commit
44dcfe29aa
2 changed files with 23 additions and 8 deletions
|
@ -7,7 +7,7 @@ use tar::{Archive, Builder};
|
|||
|
||||
use crate::error::Error;
|
||||
|
||||
pub fn to_tar_gz(src: &Path, dest: &Path) -> Result<(), Error> {
|
||||
pub fn to_tar_gz(src: impl AsRef<Path>, dest: impl AsRef<Path>) -> Result<(), Error> {
|
||||
let f = File::create(dest)?;
|
||||
let gz_encoder = GzEncoder::new(f, Compression::default());
|
||||
let mut tar_encoder = Builder::new(gz_encoder);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue