On Tue, Feb 25, 2003 at 03:57:54PM +0100, Jack wrote:
> dir, cd dir, slot bla, mget -O slot:blubb *.bla
> works fine when i enter all commands manually into lftp
> but when i write them to a file and do lftp -f file
> lftp always does "CWD /" when i switch the slot.

This patch should fix the bug.

--
   Alexander.                      | http://www.yars.free.net/~lav/  
Index: CmdExec.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/CmdExec.cc,v
retrieving revision 1.98
diff -u -p -r1.98 CmdExec.cc
--- CmdExec.cc  31 Jul 2002 14:40:02 -0000      1.98
+++ CmdExec.cc  26 Feb 2003 08:12:15 -0000
@@ -368,9 +368,9 @@ int CmdExec::Do()
               const char *cwd=session->GetCwd();
               eprintf(_("cd ok, cwd=%s\n"),cwd?cwd:"~");
               cwd_history.Set(session,old_cwd);
-              if(slot)
-                 ConnectionSlot::SetCwd(slot,cwd);
            }
+           if(slot)
+              ConnectionSlot::SetCwd(slot,session->GetCwd());
            session->Close();
            exit_code=0;
            builtin=BUILTIN_NONE;

Reply via email to