From 6abce6c2bbffdf1042b3105161401a6905dd81e6 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 23 Jan 2020 10:14:46 +0100 Subject: [PATCH] src/backup/datastore.rs: remove_backup_(group/dir) - return Error instead of io::Error --- src/backup/datastore.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index 77ca0bc4..47eb1b52 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -185,12 +185,12 @@ impl DataStore { } /// Remove a complete backup group including all snapshots - pub fn remove_backup_group(&self, backup_group: &BackupGroup) -> Result<(), io::Error> { + pub fn remove_backup_group(&self, backup_group: &BackupGroup) -> Result<(), Error> { let full_path = self.group_path(backup_group); log::info!("removing backup group {:?}", full_path); - std::fs::remove_dir_all(full_path)?; + std::fs::remove_dir_all(&full_path) .map_err(|err| { format_err!( "removing backup group {:?} failed - {}", @@ -203,12 +203,12 @@ impl DataStore { } /// Remove a backup directory including all content - pub fn remove_backup_dir(&self, backup_dir: &BackupDir) -> Result<(), io::Error> { + pub fn remove_backup_dir(&self, backup_dir: &BackupDir) -> Result<(), Error> { let full_path = self.snapshot_path(backup_dir); log::info!("removing backup snapshot {:?}", full_path); - std::fs::remove_dir_all(full_path) + std::fs::remove_dir_all(&full_path) .map_err(|err| { format_err!( "removing backup snapshot {:?} failed - {}",