Bug in forward.lua. Wasn't breaking from the loop.

This commit is contained in:
Diego Nehab 2005-04-21 05:38:07 +00:00
parent 434e8e014c
commit 9596c7f95d
3 changed files with 18 additions and 12 deletions

View file

@ -105,7 +105,7 @@ function metat.__index:send(sendt)
if self.pasvt then self:pasvconnect() end
-- get the transfer argument and command
local argument = sendt.argument or
url.unescape(string.gsub(sendt.path or "", "^/", ""))
url.unescape(string.gsub(sendt.path or "", "^[/\\]", ""))
if argument == "" then argument = nil end
local command = sendt.command or "stor"
-- send the transfer command and check the reply
@ -138,7 +138,7 @@ function metat.__index:receive(recvt)
self.try(self.pasvt or self.server, "need port or pasv first")
if self.pasvt then self:pasvconnect() end
local argument = recvt.argument or
url.unescape(string.gsub(recvt.path or "", "^/", ""))
url.unescape(string.gsub(recvt.path or "", "^[/\\]", ""))
if argument == "" then argument = nil end
local command = recvt.command or "retr"
self.try(self.tp:command(command, argument))