diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-04-21 05:38:07 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-04-21 05:38:07 +0000 |
commit | 9596c7f95d3ab990bb741107f7cf94ec5dff3e3b (patch) | |
tree | a4f014b1a2ab769b7b0d8801e761a6b18a2cd97f /src/ftp.lua | |
parent | 434e8e014cb21b8d15d512b966ea4f397fd0d369 (diff) | |
download | luasocket-9596c7f95d3ab990bb741107f7cf94ec5dff3e3b.tar.gz luasocket-9596c7f95d3ab990bb741107f7cf94ec5dff3e3b.tar.bz2 luasocket-9596c7f95d3ab990bb741107f7cf94ec5dff3e3b.zip |
Bug in forward.lua. Wasn't breaking from the loop.
Diffstat (limited to 'src/ftp.lua')
-rw-r--r-- | src/ftp.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ftp.lua b/src/ftp.lua index 9b7c1e5..a793298 100644 --- a/src/ftp.lua +++ b/src/ftp.lua | |||
@@ -105,7 +105,7 @@ function metat.__index:send(sendt) | |||
105 | if self.pasvt then self:pasvconnect() end | 105 | if self.pasvt then self:pasvconnect() end |
106 | -- get the transfer argument and command | 106 | -- get the transfer argument and command |
107 | local argument = sendt.argument or | 107 | local argument = sendt.argument or |
108 | url.unescape(string.gsub(sendt.path or "", "^/", "")) | 108 | url.unescape(string.gsub(sendt.path or "", "^[/\\]", "")) |
109 | if argument == "" then argument = nil end | 109 | if argument == "" then argument = nil end |
110 | local command = sendt.command or "stor" | 110 | local command = sendt.command or "stor" |
111 | -- send the transfer command and check the reply | 111 | -- send the transfer command and check the reply |
@@ -138,7 +138,7 @@ function metat.__index:receive(recvt) | |||
138 | self.try(self.pasvt or self.server, "need port or pasv first") | 138 | self.try(self.pasvt or self.server, "need port or pasv first") |
139 | if self.pasvt then self:pasvconnect() end | 139 | if self.pasvt then self:pasvconnect() end |
140 | local argument = recvt.argument or | 140 | local argument = recvt.argument or |
141 | url.unescape(string.gsub(recvt.path or "", "^/", "")) | 141 | url.unescape(string.gsub(recvt.path or "", "^[/\\]", "")) |
142 | if argument == "" then argument = nil end | 142 | if argument == "" then argument = nil end |
143 | local command = recvt.command or "retr" | 143 | local command = recvt.command or "retr" |
144 | self.try(self.tp:command(command, argument)) | 144 | self.try(self.tp:command(command, argument)) |