[Zope] LocalFS on 2.3.0

Ron Bickers rbickers@logicetc.com
Mon, 29 Jan 2001 20:04:48 -0500


I submitted the following patch to the LocalFS maintainer not too long ago.
LocalDirectory objects don't have _local_path set, so
bobobase_modification_time() barfs when the new management interface tries
to display the mod time.

--- 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