Merge pull request #128 from Tieske/accidental_global

fixed accidental global in `ftp.lua`
This commit is contained in:
Diego Nehab 2015-03-01 22:01:15 -03:00
commit 9d49cdcf05

View File

@ -268,7 +268,7 @@ _M.command = socket.protect(function(cmdt)
cmdt = override(cmdt) cmdt = override(cmdt)
socket.try(cmdt.host, "missing hostname") socket.try(cmdt.host, "missing hostname")
socket.try(cmdt.command, "missing command") socket.try(cmdt.command, "missing command")
local f = open(cmdt.host, cmdt.port, cmdt.create) local f = _M.open(cmdt.host, cmdt.port, cmdt.create)
f:greet() f:greet()
f:login(cmdt.user, cmdt.password) f:login(cmdt.user, cmdt.password)
f.try(f.tp:command(cmdt.command, cmdt.argument)) f.try(f.tp:command(cmdt.command, cmdt.argument))