From: Nigel Metheringham Date: Wed, 23 Jun 2010 11:46:27 +0000 (+0100) Subject: Use URL directly in rsync rather than breaking it X-Git-Url: https://git.exim.org/mirror-monitor.git/commitdiff_plain/232c01585e1593edb271b0f79ae337b21d5c9ed5?ds=sidebyside Use URL directly in rsync rather than breaking it --- 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 )