From: Gordon Hecker Date: Tue, 7 Dec 2010 12:59:17 +0000 (+0100) Subject: transport/rsync+ssh: fix rsync usage to avoid creation of additional X-Git-Tag: e2factory-2.3.9~1 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=56c55fd81d15b294f851ff9b5091fd6845edeb44;p=e2factory.git transport/rsync+ssh: fix rsync usage to avoid creation of additional directory in existing remote directory Signed-off-by: Gordon Hecker --- diff --git a/generic/transport.lua b/generic/transport.lua index d9d317d..4fcb899 100644 --- a/generic/transport.lua +++ b/generic/transport.lua @@ -55,7 +55,8 @@ local function rsync_ssh_mkdir(opts, server, dir) local emptydir = e2lib.mktempdir() local stack = {} while dir ~= "/" do - rc, re = rsync_ssh(opts .. " -r", emptydir, server .. dir) + rc, re = rsync_ssh(opts .. " -r", emptydir .. "/", + server .. dir .. "/") if rc then -- successfully made a directory break @@ -69,7 +70,8 @@ local function rsync_ssh_mkdir(opts, server, dir) while #stack > 0 do dir = dir .. "/" .. stack[1] table.remove(stack, 1) - rc, re = rsync_ssh(opts .. " -r", emptydir, server .. dir) + rc, re = rsync_ssh(opts .. " -r", emptydir .. "/", + server .. dir .. "/") if not rc then e2lib.rmtempdir(emptydir) local e = new_error("could not make remote directory")