From 232c01585e1593edb271b0f79ae337b21d5c9ed5 Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Wed, 23 Jun 2010 12:46:27 +0100 Subject: [PATCH] Use URL directly in rsync rather than breaking it --- mirmon/probe | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mirmon/probe b/mirmon/probe index 717cb16..fd6a5f8 100755 --- a/mirmon/probe +++ b/mirmon/probe @@ -52,13 +52,11 @@ my $opt_q = '' ; $opt_q = '-q' if $opt{q} ; # handle ftp/http urls with wget if ( $url =~ m!^rsync://(.*)$! ) - { my $src = $1 ; - my $dst = $src ; + { my $dst = $1 ; $dst =~ s![/\s]!_!g ; my $TMP = "$tmp_dir/$dst" ; - $src =~ s!/!::! ; unlink $TMP ; # ignore status - my $cmd = "$RSYNC $opt_v $opt_q --no-motd --timeout $timeout $src $TMP" ; + my $cmd = "$RSYNC $opt_v $opt_q --no-motd --timeout $timeout $url $TMP" ; Warn sprintf "'%s'\n", $cmd if $opt{d} ; system $cmd ; if ( open TMP, $TMP ) -- 2.30.2