X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/2f579cf4c0d8ff95af78103783c7ca8f951cc797..172f4c8807d44ebe38c7f227b7fdc2d6a9dbe323:/src/command/sync_down.rs diff --git a/src/command/sync_down.rs b/src/command/sync_down.rs index c00b01a..bba34b2 100644 --- a/src/command/sync_down.rs +++ b/src/command/sync_down.rs @@ -1,4 +1,6 @@ -use std::io::Result; +use std::io::{Result}; +use crate::configuration::Configuration; +use crate::remote::sync_down; pub struct SyncDown; @@ -13,8 +15,10 @@ impl super::Command for SyncDown { vec![] } - fn execute(&self, input: Option<&String>) -> Result<()> { - println!("Sync Down: {:?}!", input); + fn execute(&self, _: Option<&String>, configuration: &Configuration, command: &String) -> Result<()> { + if command == self.command() { + return sync_down(&configuration.data_directory, &configuration.remote_config); + } return Ok(()) }