Fix untar when desired_outputs is not None

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-10 15:49:54 +10:00
parent 29b28a4f8f
commit d2e688c4c2
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -1,5 +1,5 @@
use std::borrow::Cow;
use std::fs::File;
use std::fs::{self, File};
use std::io::Read;
use std::path::Path;
@ -29,6 +29,8 @@ fn untar(
if desired_outputs.contains(&entry_path) {
let dst = path.join(entry_path);
fs::create_dir_all(dst.parent().unwrap())?;
entry.unpack(dst)?;
}
}