Skip to content

Commit

Permalink
Merge pull request #19 from sirkonst/ignore_flags_for_command_LIST
Browse files Browse the repository at this point in the history
ignore special flags for command LIST
  • Loading branch information
sudorandom committed Oct 23, 2013
2 parents 3fe03b3 + 9f21a8e commit 0d8c28b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions swftp/ftp/server.py
Expand Up @@ -83,6 +83,14 @@ def pass_cb(res):
d.addCallback(pass_cb)
return d

def ftp_LIST(self, path=''):
# ignore special flags for command LIST
keys = ['-a', '-l', '-la', '-al']
segm = path.split()
path = " ".join(s for s in segm if s.lower() not in keys)

return super(SwftpFTPProtocol, self).ftp_LIST(path)

def cleanupDTP(self):
"""
Overwrite cleanupDTP() for fix socket leak
Expand Down

0 comments on commit 0d8c28b

Please sign in to comment.