aboutsummaryrefslogtreecommitdiff
path: root/hbak/src
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2024-02-14 23:32:38 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2024-02-14 23:32:38 +0100
commitf7f67ced27dd4d10aee04a205a5645ea783c3cfd (patch)
treea828e363696772ed04417d18da94a715ef47b182 /hbak/src
parent835a032d26976e8a9445fc7c418d871709582082 (diff)
hbak: move mount check to restoration logic
Won't catch all attempts in download logic.
Diffstat (limited to 'hbak/src')
-rw-r--r--hbak/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/hbak/src/main.rs b/hbak/src/main.rs
index d29816c..ce22b56 100644
--- a/hbak/src/main.rs
+++ b/hbak/src/main.rs
@@ -468,8 +468,6 @@ fn restore(
};
for subvol in &local_node.config().subvols {
- ensure_unmounted(subvol.clone())?;
-
let volume = Volume::new_local(local_node, subvol.to_string())?;
local_sync_info
.volumes
@@ -533,6 +531,8 @@ fn restore(
if !no_restore {
for subvol in &local_node.config().subvols {
+ ensure_unmounted(subvol.clone())?;
+
println!("Restoring subvolume {}", subvol);
local_node.restore(subvol.clone(), ignore_fstab)?;
}