diff --git a/src/repository.rs b/src/repository.rs index f888075..ee1cdad 100644 --- a/src/repository.rs +++ b/src/repository.rs @@ -70,6 +70,7 @@ impl Repository { } fn update(&self) -> Result { + debug!("UPDATED NOT IMPLEMENTED YET."); Ok(false) } @@ -310,8 +311,13 @@ impl Repository { Ok(Some(data.into())) } Err(ref err) if err.kind() == io::ErrorKind::NotFound && create => { - self.populate_uri_dir(uri)?; - self.load_file(uri, false) + if let Err(_) = self.populate_uri_dir(uri) { + debug!("rsync failed. Skipping ..."); + Ok(None) + } + else { + self.load_file(uri, false) + } } Err(err) => Err(err.into()) } diff --git a/src/rsync.rs b/src/rsync.rs index 4c2d3a1..52577dd 100644 --- a/src/rsync.rs +++ b/src/rsync.rs @@ -18,6 +18,7 @@ pub fn update>( let status = Command::new("rsync") .arg("-az") .arg("--delete") + .arg("--contimeout=10") .arg(source.as_str()) .arg(destination.as_ref()) .status()?;