Can compress QCow2
This commit is contained in:
parent
e869517bb1
commit
3ffc64f129
@ -168,6 +168,16 @@ impl DiskFileInfo {
|
||||
cmd
|
||||
}
|
||||
|
||||
// Compress QCow2
|
||||
(DiskFileFormat::QCow2 { .. }, DiskFileFormat::CompressedQCow2) => {
|
||||
let mut cmd = Command::new(constants::GZIP_PROGRAM);
|
||||
cmd.arg("--keep")
|
||||
.arg("--to-stdout")
|
||||
.arg(&self.file_path)
|
||||
.stdout(File::create(&temp_file)?);
|
||||
cmd
|
||||
}
|
||||
|
||||
// Dumb copy of file
|
||||
(a, b) if a == b => {
|
||||
let mut cmd = Command::new(constants::COPY_PROGRAM);
|
||||
|
Loading…
x
Reference in New Issue
Block a user