fix message output

This commit is contained in:
timeshifter
2026-05-03 15:26:33 +02:00
parent df540dd43b
commit 6e85041f47
2 changed files with 11 additions and 4 deletions
+9 -4
View File
@@ -83,10 +83,14 @@ fn do_backup(
let todos = Todo::plan(local_pool, backup_pool, snapshot_tag, snapshot_interval)
.context("planning todos")?;
if !todos.is_empty() && ask_user_confirmation(&todos).context("asking user confirmation")? {
println!("executing:");
execute_todos(local_pool, backup_pool, todos)?;
return Ok(true);
if todos.is_empty() {
println!("nothing to do");
} else {
if ask_user_confirmation(&todos).context("asking user confirmation")? {
println!("executing:");
execute_todos(local_pool, backup_pool, todos)?;
return Ok(true);
}
}
Ok(false)
@@ -164,6 +168,7 @@ fn decrypt_backup(pools: &BackupPools) -> Result<(String, String)> {
}
fn encrypt_backup(crypt_device: String) -> Result<()> {
println!("encrypting {crypt_device}");
cryptsetup::close(&crypt_device)
}
+2
View File
@@ -91,6 +91,8 @@ impl ZPool {
}
pub fn export(self) -> Result<()> {
let name = &self.name;
println!("Exporting {name}");
zpool_export(&self.name)
}