Subject: | Net::OpenSSH rsync_get bug on MAC |
Date: | Tue, 27 Aug 2013 09:57:45 +0800 |
To: | bug-Net-OpenSSH [...] rt.cpan.org |
From: | hotsnow <laiweiwei [...] gmail.com> |
Hi:
I run Net::OpenSSH on MAC, but it can't use rsync_get to pull multi files (single file is ok), because MAC's rsync client not support this command format:
rsync -av user@1.1.1.1:/tmp/foo1 user@1.1.1.1:/tmp/foo2 /dst_dir/
anyway both MAC and Linux support this command format:
rsync -av user@1.1.1.1:"/tmp/foo1 /tmp/foo2" /dst_dir/
So I changed the OpenSSH.pm on line 1914:
my @src = map "$prefix:$_", $self->_quote_args({quote_args => 1,
changed to:
my @src = map "$prefix:$_", join " ", $self->_quote_args({quote_args => 1,
It work well for me, ^_^
test on:
Net::OpenSSH version 0.60
Linux: CentOS release 6.3 (Final), perl v5.10.1
MAC: OSX 10.8, perl 5.12.4