2 Commits

Author SHA1 Message Date
64c78a4a69 Update Rust crate actix-http to 3.11.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-06-01 00:23:47 +00:00
d1ca9aee39 Fix bad qemu-img conversions
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-31 11:24:01 +02:00
2 changed files with 17 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ actix-identity = "0.8.0"
actix-cors = "0.7.1" actix-cors = "0.7.1"
actix-files = "0.6.6" actix-files = "0.6.6"
actix-ws = "0.3.0" actix-ws = "0.3.0"
actix-http = "3.10.0" actix-http = "3.11.0"
serde = { version = "1.0.219", features = ["derive"] } serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140" serde_json = "1.0.140"
quick-xml = { version = "0.37.5", features = ["serialize", "overlapped-lists"] } quick-xml = { version = "0.37.5", features = ["serialize", "overlapped-lists"] }

View File

@@ -183,7 +183,13 @@ impl DiskFileInfo {
// Convert QCow2 to Raw file // Convert QCow2 to Raw file
(DiskFileFormat::QCow2 { .. }, DiskFileFormat::Raw { is_sparse }) => { (DiskFileFormat::QCow2 { .. }, DiskFileFormat::Raw { is_sparse }) => {
let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM); let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM);
cmd.arg("convert").arg(&self.file_path).arg(&temp_file); cmd.arg("convert")
.arg("-f")
.arg("qcow2")
.arg("-O")
.arg("raw")
.arg(&self.file_path)
.arg(&temp_file);
if !is_sparse { if !is_sparse {
cmd.args(["-S", "0"]); cmd.args(["-S", "0"]);
@@ -197,6 +203,8 @@ impl DiskFileInfo {
(DiskFileFormat::QCow2 { .. }, DiskFileFormat::QCow2 { .. }) => { (DiskFileFormat::QCow2 { .. }, DiskFileFormat::QCow2 { .. }) => {
let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM); let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM);
cmd.arg("convert") cmd.arg("convert")
.arg("-f")
.arg("qcow2")
.arg("-O") .arg("-O")
.arg("qcow2") .arg("qcow2")
.arg(&self.file_path) .arg(&self.file_path)
@@ -207,7 +215,13 @@ impl DiskFileInfo {
// Convert Raw to QCow2 file // Convert Raw to QCow2 file
(DiskFileFormat::Raw { .. }, DiskFileFormat::QCow2 { .. }) => { (DiskFileFormat::Raw { .. }, DiskFileFormat::QCow2 { .. }) => {
let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM); let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM);
cmd.arg("convert").arg(&self.file_path).arg(&temp_file); cmd.arg("convert")
.arg("-f")
.arg("raw")
.arg("-O")
.arg("qcow2")
.arg(&self.file_path)
.arg(&temp_file);
cmd cmd
} }