diff options
author | Luca <acidvertigo@users.noreply.github.com> | 2015-06-27 14:40:12 +0200 |
---|---|---|
committer | Luca <acidvertigo@users.noreply.github.com> | 2015-06-27 14:40:12 +0200 |
commit | 40a4a393740e3cf72dd37a243d5b72d7cde7f721 (patch) | |
tree | 28ef46fb183a2d8ee4c13b1e6b777983e2471bb5 | |
parent | 04f64fde855c83671fa0a36271253f66121cb2e6 (diff) | |
download | Nim-40a4a393740e3cf72dd37a243d5b72d7cde7f721.tar.gz |
Remove redundant 220 check
-rw-r--r-- | lib/pure/ftpclient.nim | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/pure/ftpclient.nim b/lib/pure/ftpclient.nim index eaa8c82b2..301ca227a 100644 --- a/lib/pure/ftpclient.nim +++ b/lib/pure/ftpclient.nim @@ -270,11 +270,10 @@ proc connect*[T](ftp: FtpBase[T]) = reply = ftp.expectReply() # Handle 220 messages from the server - if reply.startsWith("220"): + assertReply ftp.expectReply(), "220" + while reply.continuesWith("-", 3): # handle multiline 220 message assertReply ftp.expectReply(), "220" - while reply.continuesWith("-", 3): # handle multiline 220 message - assertReply ftp.expectReply(), "220" - reply = ftp.expectReply() + reply = ftp.expectReply() if ftp.user != "": assertReply(ftp.send("USER " & ftp.user), "230", "331") |