summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-12-23 11:02:24 +0200
committerLars Wirzenius <liw@liw.fi>2020-12-23 11:02:24 +0200
commit543614a33aad1646cbb25af323e8374c88912203 (patch)
treed631425a1d1332280cc327074cfa87f465c5dfab /src
parent8f98fb2c4fcee7310985c011cc7f8fe6153c09bb (diff)
downloadobnam2-543614a33aad1646cbb25af323e8374c88912203.tar.gz
feat: re-enable progress bars for backup and restore
Diffstat (limited to 'src')
-rw-r--r--src/cmd/backup.rs2
-rw-r--r--src/cmd/restore.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/backup.rs b/src/cmd/backup.rs
index 178684f..3303566 100644
--- a/src/cmd/backup.rs
+++ b/src/cmd/backup.rs
@@ -23,7 +23,7 @@ pub fn backup(config: &ClientConfig, buffer_size: usize) -> anyhow::Result<()> {
// The fetching is in its own block so that the file handles
// get closed and data flushed to disk.
let mut gen = Generation::create(&dbname)?;
- let progress = create_progress_bar(GUESS_FILE_COUNT, false);
+ let progress = create_progress_bar(GUESS_FILE_COUNT, true);
progress.enable_steady_tick(100);
gen.insert_iter(FsIterator::new(&config.root).map(|entry| {
progress.inc(1);
diff --git a/src/cmd/restore.rs b/src/cmd/restore.rs
index 791bebf..b4a8f2b 100644
--- a/src/cmd/restore.rs
+++ b/src/cmd/restore.rs
@@ -39,7 +39,7 @@ pub fn restore(config: &ClientConfig, gen_id: &str, to: &Path) -> anyhow::Result
let gen = Generation::open(&dbname)?;
info!("restore file count: {}", gen.file_count());
- let progress = create_progress_bar(gen.file_count(), false);
+ let progress = create_progress_bar(gen.file_count(), true);
for (fileid, entry) in gen.files()? {
restore_generation(&client, &gen, fileid, &entry, &to, &progress)?;
}