1
0
mirror of https://github.com/NLnetLabs/routinator.git synced 2024-05-19 06:50:04 +00:00

Fix rsync module.

How did that happen?
This commit is contained in:
Martin Hoffmann
2018-07-24 10:56:06 +02:00
parent 20f292f409
commit a841a066b8

View File

@ -42,6 +42,7 @@ impl Command {
if !destination.ends_with("/") {
destination.push('/')
}
let mut cmd = process::Command::new("rsync");
cmd.arg("-az")
.arg("--delete");
if self.has_contimeout {
@ -153,7 +154,7 @@ impl Uri {
pub fn join(&self, path: &[u8]) -> Self {
assert!(is_uri_ascii(path));
let mut res = self.clone();
if !res.path.ends_with(b"/") {
if !res.path.is_empty() && !res.path.ends_with(b"/") {
res.path.to_mut().extend_from_slice(b"/");
}
res.path.to_mut().extend_from_slice(path);