Skip to content
Snippets Groups Projects
Commit 4b5dad9f authored by nfontrod's avatar nfontrod
Browse files

src/main.rs: add silent umount before PreCo, Checkout, Commit and Mount

parent ee2dd78a
Branches
No related tags found
No related merge requests found
......@@ -167,6 +167,7 @@ fn main() {
init::init_and_hook(init.hooks, &init.compression, &init.mode);
}
Commands::Commit(commit) => {
mount::umount_archive(true);
if commit.revert {
if commit.revert == commit.update {
eprintln!("Error: You moust choose between --revert and --update option")
......@@ -182,9 +183,11 @@ fn main() {
list::borg_list(list.first, list.last, &list.archive);
}
Commands::PreCo => {
mount::umount_archive(true);
checkout::prepare_checkout();
}
Commands::Checkout(co) => {
mount::umount_archive(true);
checkout::checkout(&co.mode);
}
Commands::CreateHooks(ch) => {
......@@ -197,10 +200,11 @@ fn main() {
create_hooks::delete_hooks();
}
Commands::Mount(mount) => {
mount::umount_archive(true);
mount::mount_archive(&mount.commit, &mount.path, mount.versions);
}
Commands::Umount => {
mount::umount_archive();
mount::umount_archive(false);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment