Ticket #5411: ftp.patch

File ftp.patch, 0.8 KB (added by oberstet, 2 years ago)
  • twisted/topfiles/5411.bugfix

     
     1Fix bug with FTP directory listing trying to write Unicode data (from filenames) to the TCP transport. 
  • twisted/protocols/ftp.py

     
    415415            'group': group[:8], 
    416416            'size': size, 
    417417            'date': formatDate(time.gmtime(modified)), 
    418             'name': name} 
     418            'name': name.encode("utf-8")} 
    419419 
    420420    def sendListResponse(self, name, response): 
    421421        self.sendLine(self._formatOneListResponse(name, *response))