diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/backup.rs | 3 | ||||
-rw-r--r-- | src/cmd/restore.rs | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/cmd/backup.rs b/src/cmd/backup.rs index 92b0f40..e4569e8 100644 --- a/src/cmd/backup.rs +++ b/src/cmd/backup.rs @@ -3,6 +3,7 @@ use crate::backup_run::BackupRun; use crate::client::BackupClient; use crate::config::ClientConfig; +use crate::dbgen::FileId; use crate::error::ObnamError; use crate::generation::GenId; @@ -76,7 +77,7 @@ impl Backup { fn report_stats( runtime: &SystemTime, - file_count: i64, + file_count: FileId, gen_id: &GenId, num_warnings: usize, ) -> Result<(), ObnamError> { diff --git a/src/cmd/restore.rs b/src/cmd/restore.rs index 7b3d95e..983efbb 100644 --- a/src/cmd/restore.rs +++ b/src/cmd/restore.rs @@ -3,6 +3,7 @@ use crate::backup_reason::Reason; use crate::client::{BackupClient, ClientError}; use crate::config::ClientConfig; +use crate::dbgen::FileId; use crate::error::ObnamError; use crate::fsentry::{FilesystemEntry, FilesystemKind}; use crate::generation::{LocalGeneration, LocalGenerationError}; @@ -132,7 +133,7 @@ pub enum RestoreError { async fn restore_generation( client: &BackupClient, gen: &LocalGeneration, - fileid: i64, + fileid: FileId, entry: &FilesystemEntry, to: &Path, progress: &ProgressBar, @@ -185,7 +186,7 @@ async fn restore_regular( client: &BackupClient, gen: &LocalGeneration, path: &Path, - fileid: i64, + fileid: FileId, entry: &FilesystemEntry, ) -> Result<(), RestoreError> { debug!("restoring regular {}", path.display()); @@ -293,9 +294,9 @@ fn path_to_cstring(path: &Path) -> CString { CString::new(path).unwrap() } -fn create_progress_bar(file_count: i64, verbose: bool) -> ProgressBar { +fn create_progress_bar(file_count: FileId, verbose: bool) -> ProgressBar { let progress = if verbose { - ProgressBar::new(file_count as u64) + ProgressBar::new(file_count) } else { ProgressBar::hidden() }; |