bug #2546: fix bug with remotes rsync copy

(cherry picked from commit 7f409c7b7c14e2ded91a6ea040c940861cc3773e)