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
+6 -1
View File
@@ -83,11 +83,15 @@ fn do_backup(
let todos = Todo::plan(local_pool, backup_pool, snapshot_tag, snapshot_interval) let todos = Todo::plan(local_pool, backup_pool, snapshot_tag, snapshot_interval)
.context("planning todos")?; .context("planning todos")?;
if !todos.is_empty() && ask_user_confirmation(&todos).context("asking user confirmation")? { if todos.is_empty() {
println!("nothing to do");
} else {
if ask_user_confirmation(&todos).context("asking user confirmation")? {
println!("executing:"); println!("executing:");
execute_todos(local_pool, backup_pool, todos)?; execute_todos(local_pool, backup_pool, todos)?;
return Ok(true); return Ok(true);
} }
}
Ok(false) Ok(false)
} }
@@ -164,6 +168,7 @@ fn decrypt_backup(pools: &BackupPools) -> Result<(String, String)> {
} }
fn encrypt_backup(crypt_device: String) -> Result<()> { fn encrypt_backup(crypt_device: String) -> Result<()> {
println!("encrypting {crypt_device}");
cryptsetup::close(&crypt_device) cryptsetup::close(&crypt_device)
} }
+2
View File
@@ -91,6 +91,8 @@ impl ZPool {
} }
pub fn export(self) -> Result<()> { pub fn export(self) -> Result<()> {
let name = &self.name;
println!("Exporting {name}");
zpool_export(&self.name) zpool_export(&self.name)
} }