diff --git a/datman/src/commands/backup.rs b/datman/src/commands/backup.rs index ecd8855..1d5fbe7 100644 --- a/datman/src/commands/backup.rs +++ b/datman/src/commands/backup.rs @@ -17,7 +17,9 @@ along with Yama. If not, see . use crate::descriptor::{Descriptor, DestPileDescriptor, SourceDescriptor, VirtualSourceKind}; use crate::get_hostname; -use crate::labelling::{label_node, load_labelling_rules, str_to_label, Label, State}; +use crate::labelling::{ + label_node, load_labelling_rules, str_to_label, Label, LabellingRules, State, +}; use crate::tree::{scan, FileTree, FileTree1}; use anyhow::{anyhow, bail}; use arc_interner::ArcIntern; @@ -76,8 +78,8 @@ pub fn open_stdout_backup_process( pub fn label_filter_and_convert( tree: FileTree1<()>, descriptor: &Descriptor, - desc_path: &Path, source_name: &str, + rules: &LabellingRules, dest: &DestPileDescriptor, ) -> anyhow::Result> { info!("Labelling."); @@ -87,8 +89,7 @@ pub fn label_filter_and_convert( .iter() .map(|l| Label(ArcIntern::new(l.clone()))) .collect(); - let rules = load_labelling_rules(desc_path, source_name)?; - label_node("".to_owned(), None, &mut tree, &labels, &rules)?; + label_node("".to_owned(), None, &mut tree, &labels, rules)?; let included_labels: HashSet