~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/ftp_server/pyftpdlib_based.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-07 17:46:25 UTC
  • mfrom: (4939.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100107174625-iza3wa6kf020jgd1
(vila) Unicode path support for FTP transports

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
    def listdir(self, path):
52
52
        """List the content of a directory."""
53
 
        # FIXME: need tests with unicode paths
54
53
        return [osutils.safe_utf8(s) for s in os.listdir(path)]
55
54
 
56
55
    def fs2ftp(self, fspath):
57
56
        p = ftpserver.AbstractedFS.fs2ftp(self, fspath)
58
 
        # FIXME: need tests with unicode paths
59
57
        return osutils.safe_utf8(p)
60
58
 
 
59
    def ftp2fs(self, ftppath):
 
60
        p = osutils.safe_unicode(ftppath)
 
61
        return ftpserver.AbstractedFS.ftp2fs(self, p)
61
62
 
62
63
class BzrConformingFTPHandler(ftpserver.FTPHandler):
63
64