[Zope] Problem with LocalFS and Zope 2.3.0b1 (fix)

Ron Bickers rbickers@logicetc.com
Thu, 18 Jan 2001 18:09:09 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C08179.C1024030
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Hamish Lawson
> Sent: Thursday, January 18, 2001 11:23 AM
> To: zope@zope.org
> Subject: [Zope] Problem with LocalFS and Zope 2.3.0b1

> After adding a LocalFS object I get the error below (but the object
> gets added OK). It seems to be related to displaying the modification
> time in the management screen. I've temporarily gotten round it by

That's exactly what it is.  The Local FS object itself doesn't have
_local_path set, so bobobase_modification_time() fails when the management
screen tries to display the time.  The attached patch will fix it.  I
notified Jonothan Farr as well and he said it would be fixed for the next
release.

_______________________

Ron Bickers
Logic Etc, Inc.
rbickers@logicetc.com

------=_NextPart_000_0007_01C08179.C1024030
Content-Type: application/octet-stream;
	name="localfs.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="localfs.patch"

--- LocalFS.py-dist     Wed Jan 17 14:27:45 2001
+++ LocalFS.py  Wed Jan 17 14:33:21 2001
@@ -976,6 +976,8 @@
                 except 'Forbidden': pass
                 
     def bobobase_modification_time(self):
+        if not hasattr(self, '_local_path'):
+            self._local_path = self.basepath
         t = os.stat(self._local_path)[stat.ST_MTIME]
         return DateTime(t)
         
@@ -1179,7 +1181,7 @@
         """Change the properties of the file system object."""
 
         self.title = title
-        self.basepath = os.path.normpath(basepath)
+        self.basepath = self._local_path = os.path.normpath(basepath)
         self.default_document = default_document or self.default_document
         self.tree_view = self.isPrincipiaFolderish = tree_view
         self.catalog = catalog


------=_NextPart_000_0007_01C08179.C1024030--