[Zope-CVS] CVS: Packages/SFTPGateway/src/sftpgateway -
connector.py:1.37 statcache.py:1.4
Fred L. Drake, Jr.
fred at zope.com
Mon Dec 22 14:14:19 EST 2003
Update of /cvs-repository/Packages/SFTPGateway/src/sftpgateway
In directory cvs.zope.org:/tmp/cvs-serv27726
Modified Files:
connector.py statcache.py
Log Message:
fix "ls /" special case
=== Packages/SFTPGateway/src/sftpgateway/connector.py 1.36 => 1.37 ===
--- Packages/SFTPGateway/src/sftpgateway/connector.py:1.36 Mon Dec 22 12:18:43 2003
+++ Packages/SFTPGateway/src/sftpgateway/connector.py Mon Dec 22 14:14:19 2003
@@ -335,7 +335,10 @@
# get the directory and name to use
if filename == ".":
dirname, filename = posixpath.split(self._dirname)
- files = self._statcache.getDirectory(dirname)
+ if filename:
+ files = self._statcache.getDirectory(dirname)
+ else:
+ files = self._statcache.getDirectory(None)
else:
files = self._files
if files is None:
@@ -364,11 +367,13 @@
def return_one(self, value, name):
files = self._finish()
- if name in files:
- info = files[name]
+ realpath = posixpath.normpath(posixpath.join(self._dirname, name))
+ info = self._statcache.getEntry(realpath)
+ if info is None:
+ self._app.debug("could not locate file attrs for %r", name)
+ raise OSError(errno.ENOENT, "file not found", name)
+ else:
return info.attrs, info.linktarget
- self._app.debug("could not locate file attrs for %r", name)
- raise OSError(errno.ENOENT, "file not found", name)
def _finish(self):
files = self._files
=== Packages/SFTPGateway/src/sftpgateway/statcache.py 1.3 => 1.4 ===
--- Packages/SFTPGateway/src/sftpgateway/statcache.py:1.3 Wed Dec 17 15:08:21 2003
+++ Packages/SFTPGateway/src/sftpgateway/statcache.py Mon Dec 22 14:14:19 2003
@@ -20,7 +20,7 @@
from twisted.internet import defer
-ROOT_KEY = (None, ".")
+ROOT_KEY = (None, "")
class StatCache:
More information about the Zope-CVS
mailing list