Improve raw sparse conversion
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Pierre HUBERT 2025-05-29 15:44:21 +02:00
parent 21fd5de139
commit d765f9c2c3

View File

@ -223,10 +223,10 @@ impl DiskFileInfo {
// Render raw file sparse
(DiskFileFormat::Raw { is_sparse: false }, DiskFileFormat::Raw { is_sparse: true }) => {
let mut cmd = Command::new(constants::COPY_PROGRAM);
cmd.arg("--sparse=always")
.arg(&self.file_path)
.arg(&temp_file);
let mut cmd = Command::new(constants::DD_PROGRAM);
cmd.arg("conv=sparse")
.arg(format!("if={}", self.file_path.display()))
.arg(format!("of={}", temp_file.display()));
cmd
}