diff options
author | btimby <btimby@67cdc799-7952-0410-af00-57a81ceafa0f> | 2012-04-21 19:16:47 +0000 |
---|---|---|
committer | btimby <btimby@67cdc799-7952-0410-af00-57a81ceafa0f> | 2012-04-21 19:16:47 +0000 |
commit | b321cc7cb40a080b9b8128e5dfd25b8906746808 (patch) | |
tree | 08880cf70dc28898cfc43ccbf1248c1350019ec9 /fs/expose | |
parent | da422dd996b1ea9ecc56a86d6448a500ba7cff2e (diff) | |
download | pyfilesystem-git-b321cc7cb40a080b9b8128e5dfd25b8906746808.tar.gz |
Don't blindly echo current uid/gid, allow fs a chance to provide them
Diffstat (limited to 'fs/expose')
-rw-r--r-- | fs/expose/ftp.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/expose/ftp.py b/fs/expose/ftp.py index 071b5cf..51880e7 100644 --- a/fs/expose/ftp.py +++ b/fs/expose/ftp.py @@ -126,10 +126,11 @@ class FTPFS(ftpserver.AbstractedFS): info = self.fs.getinfo(path) kwargs = { 'st_size': info.get('size'), - # Echo current user instead of 0/0. - 'st_uid': UID, - 'st_gid': GID, } + # Give the fs a chance to provide the uid/gid. Otherwise echo the current + # uid/gid. + kwargs['st_uid'] = info.get('st_uid', UID) + kwargs['st_gid'] = info.get('st_gid', GID) if 'st_atime' in info: kwargs['st_atime'] = info.get('st_atime') elif 'accessed_time' in info: |