[Zope-Checkins] CVS: Zope3/lib/python/Zope/Server/FTP - FTPServerChannel.py:1.1.2.24
Shane Hathaway
shane@cvs.zope.org
Fri, 12 Apr 2002 11:08:10 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Server/FTP
In directory cvs.zope.org:/tmp/cvs-serv2302
Modified Files:
Tag: Zope3-Server-Branch
FTPServerChannel.py
Log Message:
After discussing this, it turns out os.path.normpath is a good thing after all.
=== Zope3/lib/python/Zope/Server/FTP/FTPServerChannel.py 1.1.2.23 => 1.1.2.24 ===
def _generatePath(self, args):
- # Get the right source path.
+ """Convert relative paths to absolute paths."""
if args.startswith('/'):
path = args
else:
path = os.path.join(self.cwd, args)
- return self._getFilesystem().normalize(path)
+ if path.startswith('..'):
+ path = '/'
+ return os.path.normpath(path)
def newPassiveAcceptor(self):