From 0dedf035f9e4b2381e4a9cd5d412ca7a8c930b92 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Sun, 11 Jul 2010 17:25:48 +0300 Subject: [PATCH] Document ftp: allow non-latin user, group. bzr revid: p_christ@hol.gr-20100711142548-6uzoxs4224u8n2cf --- addons/document_ftp/ftpserver/abstracted_fs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/document_ftp/ftpserver/abstracted_fs.py b/addons/document_ftp/ftpserver/abstracted_fs.py index 4f0428ecb02..565f003dacd 100644 --- a/addons/document_ftp/ftpserver/abstracted_fs.py +++ b/addons/document_ftp/ftpserver/abstracted_fs.py @@ -539,8 +539,8 @@ class abstracted_fs(object): perms = filemode(node.unixperms) # permissions nlinks = 1 size = node.content_length or 0L - uname = node.uuser - gname = node.ugroup + uname = _to_decode(node.uuser) + gname = _to_decode(node.ugroup) # stat.st_mtime could fail (-1) if last mtime is too old # in which case we return the local time as last mtime try: @@ -637,9 +637,9 @@ class abstracted_fs(object): if 'unix.mode' in facts: mode = 'unix.mode=%s;' %oct(node.unixperms & 0777) if 'unix.uid' in facts: - uid = 'unix.uid=%s;' % node.uuser + uid = 'unix.uid=%s;' % _to_decode(node.uuser) if 'unix.gid' in facts: - gid = 'unix.gid=%s;' % node.ugroup + gid = 'unix.gid=%s;' % _to_decode(node.ugroup) # We provide unique fact (see RFC-3659, chapter 7.5.2) on # posix platforms only; we get it by mixing st_dev and # st_ino values which should be enough for granting an