Commit 1e7cddbc by btimby

Use stat() to determine mtime instead of relying on fs directly.

parent 54e3e133
...@@ -67,7 +67,7 @@ class FakeStat(object): ...@@ -67,7 +67,7 @@ class FakeStat(object):
class FTPFS(ftpserver.AbstractedFS): class FTPFS(ftpserver.AbstractedFS):
""" """
The basic FTP Filesystem. This is a bridge between a pyfs filesystem and pyftpdlib's The basic FTP Filesystem. This is a bridge between a pyfs filesystem and pyftpdlib's
AbstractedFS. This class will cause the FTP server to service the given fs instance. AbstractedFS. This class will cause the FTP server to serve the given fs instance.
""" """
encoding = 'utf8' encoding = 'utf8'
"Sets the encoding to use for paths." "Sets the encoding to use for paths."
...@@ -198,7 +198,7 @@ class FTPFS(ftpserver.AbstractedFS): ...@@ -198,7 +198,7 @@ class FTPFS(ftpserver.AbstractedFS):
@convert_fs_errors @convert_fs_errors
@decode_args @decode_args
def getmtime(self, path): def getmtime(self, path):
return self.fs.getinfo(path).time return self.stat(path).st_mtime
def realpath(self, path): def realpath(self, path):
return path return path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment