aboutsummaryrefslogtreecommitdiff
path: root/src/ftp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/ftp.lua')
-rw-r--r--src/ftp.lua4
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))