summaryrefslogtreecommitdiff
path: root/fs/expose
diff options
context:
space:
mode:
authorbtimby <btimby@67cdc799-7952-0410-af00-57a81ceafa0f>2012-04-21 19:16:47 +0000
committerbtimby <btimby@67cdc799-7952-0410-af00-57a81ceafa0f>2012-04-21 19:16:47 +0000
commitb321cc7cb40a080b9b8128e5dfd25b8906746808 (patch)
tree08880cf70dc28898cfc43ccbf1248c1350019ec9 /fs/expose
parentda422dd996b1ea9ecc56a86d6448a500ba7cff2e (diff)
downloadpyfilesystem-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.py7
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: